@@ -4,10 +4,9 @@ URL="https://docs-mongodborg-staging.corp.mongodb.com"
4
4
PRODUCTION_BUCKET =docs-mongodb-org-prod
5
5
PREFIX =landing
6
6
7
- .PHONY : help stage fake-deploy build
7
+ DOCS_TOOLS_THEME =docs-tools/themes/mongodb/static
8
8
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
11
10
12
11
help :
13
12
@echo ' Targets'
20
19
@echo ' ARGS - Arguments to pass to mut-publish'
21
20
22
21
stage : 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}
24
23
@echo " Hosted at ${URL} /${PREFIX} /${USER} /${GIT_BRANCH} /cloud/index.html"
25
24
@echo " Hosted at ${URL} /${PREFIX} /${USER} /${GIT_BRANCH} /tools/index.html"
26
25
@@ -30,18 +29,32 @@ deploy: build
30
29
@echo "Deployed"
31
30
32
31
build :
33
- # Clean build directory
32
+ @# Pull docs-tools updates
33
+ git submodule init
34
+ git submodule update --remote
35
+
36
+ @# Clean build directory
34
37
rm -rf $@
35
- # Create output directories
38
+
39
+ @# Create output directories
40
+ mkdir -p $@
36
41
mkdir -p $@/cloud
37
42
mkdir -p $@/tools
38
- mkdir -p $@ /images
39
- mkdir -p $@ /announcements/login-and-access-changes
43
+
40
44
@# Copy CSS and JS files to output directories
41
45
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
+
46
56
@# Run the script to generate each landing page
47
57
python3 ./gen_landings.py $@
58
+
59
+ clean :
60
+ -rm -r build
0 commit comments