Tweak catch-uncommitted-output script for clarity, after review

This commit is contained in:
Tim Perry 2017-08-23 17:01:03 +02:00
parent 47407a84fb
commit 8f0131cf50
3 changed files with 16 additions and 17 deletions

View File

@ -7,7 +7,7 @@ matrix:
- CAN_DEPLOY=true - CAN_DEPLOY=true
before_install: before_install:
- npm -g install npm@4 - npm -g install npm@4
script: ./automation/catch-uncommitted-output script: ./automation/catch-uncommitted-output.sh
notifications: notifications:
email: false email: false
deploy: deploy:

View File

@ -1,16 +0,0 @@
#!/bin/sh
set -e
npm run build
if ! git diff HEAD --exit-code ; then
echo '\n** Uncommitted changes found after build - FAIL **'
exit 1
elif test -n "$(git ls-files --exclude-standard --others)" ; then
echo '\n** Untracked uncommitted files found after build: **'
git ls-files --exclude-standard --others
echo '** FAIL **'
exit 2
else
echo '\nNo unexpected changes after build, all good.'
fi

View File

@ -0,0 +1,15 @@
#!/bin/sh
set -e
npm run build
echo
if ! git diff HEAD --exit-code ; then
echo '** Uncommitted changes found after build - FAIL **'
exit 1
elif test -n "$(git ls-files --exclude-standard --others | tee /dev/tty)" ; then
echo '** Untracked uncommitted files found after build (^^^ listed above ^^^) - FAIL **'
exit 2
else
echo 'No unexpected changes after build, all good.'
fi