From 73410d7bc759317c6a33a8d0b51a69b8b53fb3a7 Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Fri, 27 Dec 2019 00:12:15 +0100 Subject: Fix check-testdata.sh exit code propagation --- scripts/ci/check-testdata.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/ci/check-testdata.sh b/scripts/ci/check-testdata.sh index b529354..7e71661 100755 --- a/scripts/ci/check-testdata.sh +++ b/scripts/ci/check-testdata.sh @@ -1,6 +1,7 @@ #!/bin/bash CI_PROJECT_DIR=${CI_PROJECT_DIR:-.} +rv=0 set -e -o pipefail @@ -9,12 +10,22 @@ echo "=== Stack resolvers" $CI_PROJECT_DIR/scripts/ci/update-stack-resolvers.sh \ | tee tests/stack-resolvers.new -diff --from-file=tests/stack-resolvers tests/stack-resolvers.new \ - && echo OK +if diff --from-file=tests/stack-resolvers tests/stack-resolvers.new; then + echo OK +else + echo FAIL stack + rv=1 +fi echo; echo; echo "=== Cabal versions" $CI_PROJECT_DIR/scripts/ci/update-cabal-versions.sh \ | tee tests/cabal-versions.new -diff --from-file=tests/cabal-versions tests/cabal-versions.new \ - && echo OK +if diff --from-file=tests/cabal-versions tests/cabal-versions.new; then + echo OK +else + echo FAIL cabal + rv=1 +fi + +exit $rv -- cgit v1.2.3