Page MenuHomeWickedGov Phorge

check_bundle.sh
No OneTemporary

Size
855 B
Referenced Files
None
Subscribers
None

check_bundle.sh

#!/usr/bin/env bash
set -euo pipefail
cat << eof
Checking the contents of resources/dist
I will now check that you built them using the correct Node.js version v$(< .nvmrc).
Note: You are using $(node -v).
Building assets...
eof
if [ "v$(cat .nvmrc)" != "$(node -v)" ]; then
echo "You are not running the required node version"
exit 1
fi;
npm -s run build
git diff --name-status --exit-code resources/dist || {
cat << 'eof'
After I built the assets, I noticed differences in the contents to what you committed.
Try running `npm run build` again or removing the node_modules folder and running npm install with the correct node version.
eof
exit 1;
}
echo 'Your changes look good!'
exit 0;
}
echo 'There are no staged changes to the resources/dist folder in this change.'
echo 'Make sure to `npm run build` if this was not expected.'

File Metadata

Mime Type
text/x-shellscript
Expires
Aug 19 2026, 17:58 (5 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
21/d8/83eb5646b66413b6624ff4011698
Default Alt Text
check_bundle.sh (855 B)

Event Timeline