Skip to content

Commit

Permalink
Merge pull request #18753 from newrelic/campfire/add-env-var-check
Browse files Browse the repository at this point in the history
Add bash script to check for BUILD_LANG var
  • Loading branch information
LizBaker authored Sep 24, 2024
2 parents 6b3707c + 175479c commit 8d4ef55
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
"scripts": {
"add-files-to-translate": "node scripts/actions/add-files-to-translation-queue.js",
"build:production": "ENVIRONMENT=production yarn run build",
"build": "node scripts/createNetlifyRedirects.mjs & NODE_OPTIONS='--max-old-space-size=5120' gatsby build --prefix-paths",
"build": "scripts/build.sh",
"check-for-outdated-translations": "node scripts/actions/check-for-outdated-translations.js",
"clean": "gatsby clean",
"convert-to-webp": "node scripts/convertPNGs.mjs",
Expand Down Expand Up @@ -237,4 +237,4 @@
"bugs": {
"url": "https://github.com/newrelic/docs-website/issues"
}
}
}
8 changes: 8 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

if [[ -z "${BUILD_LANG}" ]]; then
echo "BUILD_LANG env var required 🥸 set BUILD_LANG=en for a default build"
exit 1
else
exec node scripts/createNetlifyRedirects.mjs & NODE_OPTIONS='--max-old-space-size=5120' gatsby build --prefix-paths
fi

0 comments on commit 8d4ef55

Please sign in to comment.