Files
shiny/tools/checkJSCurrent.sh
trestletech 67cdcedd4e Better bash
2019-06-19 11:04:39 -05:00

17 lines
482 B
Bash
Executable File

#!/bin/bash
set -e
# Run JS build process
(cd "$(dirname "$0")" && yarn && yarn build)
if [ -n "$(git status --porcelain)" ]
then
git status --porcelain
echo "Please rebuild the JavaScript and commit the changes."
echo "The above files changed when we built the JavaScript assets. This most often occurs when a user makes changes to the JavaScript sources but doesn't rebuild and commit them."
exit 1
else
echo "No difference detected; JavaScript build is current."
fi