Catch uncommitted build output automatically in Travis

Connects-To: #573
Change-Type: patch
This commit is contained in:
Tim Perry 2017-08-23 15:08:08 +02:00
parent fd308a5131
commit a36f765f1b
2 changed files with 16 additions and 1 deletions

View File

@ -7,7 +7,7 @@ matrix:
- CAN_DEPLOY=true
before_install:
- npm -g install npm
script: echo 'TODO Write some tests'
script: ./automation/catch-uncommitted-output
notifications:
email: false
deploy:

View File

@ -0,0 +1,15 @@
#!/bin/sh
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