From f36e375578fbd9dbc530193325bbf357fbb86bcb Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Thu, 4 Apr 2019 17:41:53 +0200 Subject: [PATCH] travis: Check for unignored build artifacts after the build --- scripts/test.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/test.sh b/scripts/test.sh index 41bcdb414..b958db1a0 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -324,6 +324,7 @@ apidoc) cat make.warnings exit 1 fi + rm make.warnings ;; sonarcloud) sonar-scanner \ @@ -332,7 +333,16 @@ sonarcloud) -Dsonar.sources=. \ -Dsonar.cfamily.threads=2 \ -Dsonar.cfamily.build-wrapper-output=bw-output || exit $? + rm -r bw-output .scannerwork ;; *) ;; esac + +# ensure there are no unignored build artifacts (or other changes) in the Git repo +unclean="$(git status --porcelain)" +if test -n "$unclean"; then + echo "Unignored build artifacts or other changes:" + echo "$unclean" + exit 1 +fi