@@ -4,10 +4,9 @@ URL="https://docs-mongodborg-staging.corp.mongodb.com"
44PRODUCTION_BUCKET =docs-mongodb-org-prod
55PREFIX =landing
66
7- .PHONY : help stage fake-deploy build
7+ DOCS_TOOLS_THEME =docs-tools/themes/mongodb/static
88
9- CSS_ERRORS =errors,empty-rules,duplicate-properties,selector-max-approaching
10- CSS_WARNINGS =regex-selectors,unqualified-attributes,text-indent
9+ .PHONY : help stage fake-deploy build clean
1110
1211help :
1312 @echo ' Targets'
2019 @echo ' ARGS - Arguments to pass to mut-publish'
2120
2221stage : build
23- mut-publish build/ docs-mongodb-org-staging --prefix=${PREFIX} --stage --verbose ${ARGS}
22+ mut-publish build/ docs-mongodb-org-staging --prefix=${PREFIX} --stage ${ARGS}
2423 @echo " Hosted at ${URL} /${PREFIX} /${USER} /${GIT_BRANCH} /cloud/index.html"
2524 @echo " Hosted at ${URL} /${PREFIX} /${USER} /${GIT_BRANCH} /tools/index.html"
2625
@@ -30,18 +29,32 @@ deploy: build
3029 @echo "Deployed"
3130
3231build :
33- # Clean build directory
32+ @# Pull docs-tools updates
33+ git submodule init
34+ git submodule update --remote
35+
36+ @# Clean build directory
3437 rm -rf $@
35- # Create output directories
38+
39+ @# Create output directories
40+ mkdir -p $@
3641 mkdir -p $@/cloud
3742 mkdir -p $@/tools
38- mkdir -p $@ /images
39- mkdir -p $@ /announcements/login-and-access-changes
43+
4044 @# Copy CSS and JS files to output directories
4145 cp static/favicon.png $@/favicon.ico
42- cp -r static/images static/css static/js $@ /tools
43- cp -r static/images static/css static/js $@ /cloud
44- cp -r static/images static/css static/js $@ /announcements/login-and-access-changes
45- cp -r src/images/announcements/* $@ /announcements/login-and-access-changes/images
46+ for prefix in $@/ $@/tools $@/cloud; do \
47+ mkdir -p $$prefix/js || exit 1; \
48+ cp -r static/images $$prefix || exit 1; \
49+ cp -r static/css $$prefix || exit 1; \
50+ cp ${DOCS_TOOLS_THEME}/landing.min.js* $$prefix/js || exit 1; \
51+ cp ${DOCS_TOOLS_THEME}/navbar.min.js* $$prefix/js || exit 1; \
52+ cp ${DOCS_TOOLS_THEME}/landing.css $$prefix/css || exit 1; \
53+ cp ${DOCS_TOOLS_THEME}/navbar.min.css $$prefix/css || exit 1; \
54+ done
55+
4656 @# Run the script to generate each landing page
4757 python3 ./gen_landings.py $@
58+
59+ clean :
60+ -rm -r build
0 commit comments