加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Makefile 1.68 KB
一键复制 编辑 原始数据 按行查看 历史
kay 提交于 2017-12-18 10:29 . update for 3.6
GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
USER=$(shell whoami)
STAGING_URL="https://docs-mongodborg-staging.corp.mongodb.com"
PRODUCTION_URL="https://docs.mongodb.com/getting-started"
STAGING_BUCKET=docs-mongodb-org-staging
PRODUCTION_BUCKET=docs-mongodb-org-prod
# "PROJECT" currently exists to support having multiple projects
# within one bucket.
PROJECT=getting-started
.PHONY: help lint html stage deploy deploy-search-index
help: ## Show this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
@echo
@echo 'Variables'
@printf " \033[36m%-18s\033[0m %s\n" 'ARGS' 'Arguments to pass to mut-publish'
html: ## Builds this branch's HTML under build/<branch>/html
giza make html
publish: ## Builds this branch's publishable HTML and other artifacts under build/public
giza make publish
if [ ${GIT_BRANCH} = master ]; then mut-redirects config/redirects -o build/public/.htaccess; fi
lint: ## Checks URLs in the built corpus underneath build/<branch>/html
mut-lint --linters=links ./build/master/source/ ${ARGS}
stage: ## Host online for review
mut-publish build/${GIT_BRANCH}/html-shell ${STAGING_BUCKET} --prefix=${PROJECT}/shell --stage ${ARGS}
@echo "Hosted at ${STAGING_URL}/${PROJECT}/shell/${USER}/${GIT_BRANCH}/index.html"
deploy: build/public ## Deploy to the production bucket
mut-publish build/public ${PRODUCTION_BUCKET} --prefix=${PROJECT} --deploy --redirect-prefix='getting-started' --all-subdirectories ${ARGS}
@echo "Hosted at ${PRODUCTION_URL}/index.html"
redirects:
if [ ${GIT_BRANCH} = master ]; then mut-redirects config/redirects -o build/public/.htaccess; fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化