Files
shiny/tools/checkJSCurrent.sh
Barret Schloerke 4efb7c20e4 add install cmd
2019-12-10 12:36:23 -05:00

17 lines
516 B
Bash
Executable File

#!/bin/bash
set -e
# Run JS build process
(cd "$(dirname "$0")" && yarn install --frozen-lockfile && yarn build)
if [ -n "$(git status --porcelain)" ]
then
git status --porcelain
>&2 echo "Please rebuild the JavaScript and commit the changes."
>&2 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