forked from mongodb/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (33 loc) · 1.44 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
USER=`whoami`
STAGING_URL="https://docs-mongodborg-staging.corp.mongodb.com"
PRODUCTION_URL="https://docs.mongodb.org"
STAGING_BUCKET=docs-mongodb-org-staging
PRODUCTION_BUCKET=docs-mongodb-org-prod
PREFIX=
.PHONY: help lint stage fake-deploy deploy
help:
@echo 'Targets'
@echo ' help - Show this help message'
@echo ' lint - Check links'
@echo ' stage - Host online for review'
@echo ' fake-deploy - Create a fake deployment in the staging bucket'
@echo ' deploy - Deploy to the production bucket'
@echo ''
@echo 'Variables'
@echo ' ARGS - Arguments to pass to mut-publish'
lint:
mut-lint --linters=links ./build/master/source/ ${ARGS}
stage:
mut-publish build/${GIT_BRANCH}/html ${STAGING_BUCKET} --prefix=${PREFIX} --stage ${ARGS}
@echo "Hosted at ${STAGING_URL}/${PREFIX}/${USER}/${GIT_BRANCH}/index.html"
fake-deploy: build/public
mut-publish build/public/ ${STAGING_BUCKET} --prefix=${PREFIX} --deploy ${ARGS}
@echo "Hosted at ${STAGING_URL}/${PREFIX}/index.html"
deploy: build/public
@echo "Doing a dry-run"
mut-publish build/public ${PRODUCTION_BUCKET} --prefix=${PREFIX} --deploy --verbose --all-subdirectories --dry-run ${ARGS}
@echo ''
read -p "Press any key to perform the previous"
mut-publish build/public ${PRODUCTION_BUCKET} --prefix=${PREFIX} --deploy --all-subdirectories ${ARGS}
@echo "Hosted at ${PRODUCTION_URL}/${PREFIX}/index.html"