mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-06-04 00:40:41 +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
|
- CAN_DEPLOY=true
|
||||||
before_install:
|
before_install:
|
||||||
- npm -g install npm
|
- npm -g install npm
|
||||||
script: echo 'TODO Write some tests'
|
script: ./automation/catch-uncommitted-output
|
||||||
notifications:
|
notifications:
|
||||||
email: false
|
email: false
|
||||||
deploy:
|
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…
x
Reference in New Issue
Block a user