|
1 |
| -PARSER_VERSION=0.18.14 |
2 |
| -# This make command curls the examples for certain repos. |
3 |
| -# If the rule doesn't exist, the error doesn't interrupt the build process. |
4 |
| -make examples |
| 1 | +# ensures that we always use the latest version of the script |
| 2 | +if [ -f build-site.sh ]; then |
| 3 | + rm build-site.sh |
| 4 | +fi |
5 | 5 |
|
6 |
| -if [ ! -d "snooty-parser" ]; then |
7 |
| - echo "snooty parser not installed, downloading..." |
8 |
| - curl -L -o snooty-parser.zip https://github.com/mongodb/snooty-parser/releases/download/v${PARSER_VERSION}/snooty-v${PARSER_VERSION}-linux_x86_64.zip |
9 |
| - unzip -d ./snooty-parser snooty-parser.zip |
10 |
| - chmod +x ./snooty-parser/snooty |
11 |
| -fi |
12 |
| - |
13 |
| -echo "=======================================================================================================================================================================" |
14 |
| -echo "========================================================================== Running parser... ==========================================================================" |
15 |
| -./snooty-parser/snooty/snooty build . --no-caching --output=./bundle.zip --branch=master |
16 |
| -echo "========================================================================== Parser complete ============================================================================" |
17 |
| -echo "=======================================================================================================================================================================" |
18 |
| - |
19 |
| -if [ ! -d "snooty" ]; then |
20 |
| - echo "snooty frontend not installed, downloading" |
21 |
| - git clone -b netlify-pageId-hotfix --depth 1 https://github.com/mongodb/snooty.git |
22 |
| - echo GATSBY_MANIFEST_PATH=$(pwd)/bundle.zip >> ./snooty/.env.production |
23 |
| - cd snooty |
24 |
| - npm ci --legacy-peer-deps |
25 |
| - git clone --depth 1 https://github.com/mongodb/docs-tools.git ./snooty/docs-tools |
26 |
| - mkdir -p ./snooty/static/images |
27 |
| - mv ./snooty/docs-tools/themes/mongodb/static ./static/docs-tools |
28 |
| - mv ./snooty/docs-tools/themes/guides/static/images/bg-accent.svg ./static/docs-tools/images/bg-accent.svg |
29 |
| -fi |
30 |
| - |
31 |
| -if [ -d "docs-worker-pool" ]; then |
32 |
| - node --unhandled-rejections=strict docs-worker-pool/modules/persistence/dist/index.js --path bundle.zip --githubUser netlify |
33 |
| -fi |
34 |
| - |
35 |
| - |
36 |
| -cd snooty && npm run build:no-prefix |
| 6 | +curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/netlify-poc/scripts/build-site.sh -o build-site.sh |
| 7 | +sh build-site.sh |
0 commit comments