From aabb044693f240d2505f0c45848aaa4d0fa5ec09 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 24 Oct 2016 14:24:09 +0200 Subject: [PATCH] Hard-break `make dist` when there are uncommitted changes Similar to NEWS-file test, add also SKIP_COMMIT_TEST=1 to be able to skip any such issue. This helps to notice uncommitted changes before the tarball is created. --- cmake/verify-pre-dist.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/verify-pre-dist.sh b/cmake/verify-pre-dist.sh index b311e72695..6606c7f903 100755 --- a/cmake/verify-pre-dist.sh +++ b/cmake/verify-pre-dist.sh @@ -8,4 +8,12 @@ if [ ! $? -eq 0 ]; then echo " There are uncommitted changes which will not be part of the tarball " 1>&2 echo "***********************************************************************" 1>&2 echo "" 1>&2 + + if [ "$SKIP_COMMIT_TEST" = "1" ]; then + echo "(Failed commit test skipped due to SKIP_COMMIT_TEST=1 being set.)" 1>&2 + exit 0 + else + echo "(This test can be skipped when SKIP_COMMIT_TEST=1 is set.)" 1>&2 + fi + exit 1 fi