pcottle.learnGitBranching/checkgit.sh
David Nelson 4e32f729c1 Check that there are no source file changes before building
If dependencies are changed (in package.json) without updating the yarn.lock
file, or if any other part of the build process starts producing unignored
files, the CI build will fail, so that the problem can be corrected before the
PR is merged.
2019-05-01 04:04:24 -05:00

6 lines
156 B
Bash
Executable file

GIT_STATUS=$(git status --porcelain | wc -l )
if [[ GIT_STATUS -ne 0 ]]; then
echo "${1:-Source files were modified}"
git status
exit $GIT_STATUS
fi;