Skip to content

Commit

Permalink
Check for NPM token during builds
Browse files Browse the repository at this point in the history
  • Loading branch information
kj4ezj committed Aug 2, 2024
1 parent eae0274 commit 588c0c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ pushd "$NPM_ROOT"
ee node --version
ee yarn --version
ee npm --version
if [[ "$CI" == 'true' && -z "$ACT" && -n "$NODE_AUTH_TOKEN" ]]; then
printf '\e[1;35mNOTICE: Found NODE_AUTH_TOKEN of length %s.\e[0m\n' "${#NODE_AUTH_TOKEN}"
elif [[ "$CI" == 'true' && -z "$ACT" ]]; then
printf '\e[1;31mERROR: Missing NODE_AUTH_TOKEN!\e[0m\n'
exit 11
else
echo 'Ignoring NODE_AUTH_TOKEN for local build.'
fi
# package info
PACKAGE_NAME="$(cat package.json | jq -r '.name')"
PACKAGE_VERSION="$(cat package.json | jq -r '.version')"
Expand Down

0 comments on commit 588c0c9

Please sign in to comment.