mirror of
https://github.com/balena-io/balena-cli.git
synced 2024-12-18 21:27:51 +00:00
Tweak catch-uncommitted-output script for clarity, after review
This commit is contained in:
parent
47407a84fb
commit
8f0131cf50
@ -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:
|
||||||
|
@ -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
|
|
15
automation/catch-uncommitted-output.sh
Executable file
15
automation/catch-uncommitted-output.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user