From 8f0131cf501f0f0620d9e1b6539fe7ba08f97928 Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Wed, 23 Aug 2017 17:01:03 +0200 Subject: [PATCH] Tweak catch-uncommitted-output script for clarity, after review --- .travis.yml | 2 +- automation/catch-uncommitted-output | 16 ---------------- automation/catch-uncommitted-output.sh | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 17 deletions(-) delete mode 100755 automation/catch-uncommitted-output create mode 100755 automation/catch-uncommitted-output.sh diff --git a/.travis.yml b/.travis.yml index d90a174a..a8a065bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ matrix: - CAN_DEPLOY=true before_install: - npm -g install npm@4 -script: ./automation/catch-uncommitted-output +script: ./automation/catch-uncommitted-output.sh notifications: email: false deploy: diff --git a/automation/catch-uncommitted-output b/automation/catch-uncommitted-output deleted file mode 100755 index 4e2e2c02..00000000 --- a/automation/catch-uncommitted-output +++ /dev/null @@ -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 diff --git a/automation/catch-uncommitted-output.sh b/automation/catch-uncommitted-output.sh new file mode 100755 index 00000000..608844ec --- /dev/null +++ b/automation/catch-uncommitted-output.sh @@ -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