Skip to content

Commit e198a36

Browse files
Restore build.sh
1 parent 7de2752 commit e198a36

File tree

1 file changed

+6
-34
lines changed

1 file changed

+6
-34
lines changed

build.sh

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,8 @@
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
55

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
126

13-
echo "======================================================================================================================================================================="
14-
echo "========================================================================== Running parser... =========================================================================="
15-
./snooty-parser/snooty/snooty build . --no-caching --output=./bundle.zip --branch=v1.8
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
7+
curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/netlify-poc/scripts/build-site.sh -o build-site.sh
8+
sh build-site.sh

0 commit comments

Comments
 (0)