mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-08-02 17:15:24 +02:00
Merge pull request #577 from eatdrinksleepcode/verify-no-changes
Check that there are no source file changes before building
This commit is contained in:
commit
5891d44796
2 changed files with 8 additions and 0 deletions
|
@ -11,4 +11,6 @@ cache:
|
|||
directories:
|
||||
- "node_modules"
|
||||
script:
|
||||
- ./checkgit.sh "Source files were modified before build; is yarn.lock out of sync with package.json?" || travis_terminate $?
|
||||
- yarn grunt
|
||||
- ./checkgit.sh "Source files were modified by the build" || travis_terminate $?
|
||||
|
|
6
checkgit.sh
Executable file
6
checkgit.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
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;
|
Loading…
Add table
Add a link
Reference in a new issue