mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
Catch uncommitted build output automatically in Travis
Connects-To: #573 Change-Type: patch
This commit is contained in:
parent
fd308a5131
commit
a36f765f1b
@ -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:
|
||||
|
15
automation/catch-uncommitted-output
Executable file
15
automation/catch-uncommitted-output
Executable 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
|
Loading…
Reference in New Issue
Block a user