aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xci/lib-travisci.sh10
-rwxr-xr-xci/run-linux32-docker.sh2
-rwxr-xr-xci/run-tests.sh2
-rwxr-xr-xci/test-documentation.sh6
4 files changed, 20 insertions, 0 deletions
diff --git a/ci/lib-travisci.sh b/ci/lib-travisci.sh
index 1543b7959..07f27c727 100755
--- a/ci/lib-travisci.sh
+++ b/ci/lib-travisci.sh
@@ -67,6 +67,16 @@ skip_good_tree () {
exit 0
}
+check_unignored_build_artifacts ()
+{
+ ! git ls-files --other --exclude-standard --error-unmatch \
+ -- ':/*' 2>/dev/null ||
+ {
+ echo "$(tput setaf 1)error: found unignored build artifacts$(tput sgr0)"
+ false
+ }
+}
+
# Set 'exit on error' for all CI scripts to let the caller know that
# something went wrong.
# Set tracing executed commands, primarily setting environment variables
diff --git a/ci/run-linux32-docker.sh b/ci/run-linux32-docker.sh
index 870a41246..4f191c5bb 100755
--- a/ci/run-linux32-docker.sh
+++ b/ci/run-linux32-docker.sh
@@ -23,4 +23,6 @@ docker run \
daald/ubuntu32:xenial \
/usr/src/git/ci/run-linux32-build.sh $(id -u $USER)
+check_unignored_build_artifacts
+
save_good_tree
diff --git a/ci/run-tests.sh b/ci/run-tests.sh
index eb5ba4058..22355f009 100755
--- a/ci/run-tests.sh
+++ b/ci/run-tests.sh
@@ -8,4 +8,6 @@
ln -s $HOME/travis-cache/.prove t/.prove
make --quiet test
+check_unignored_build_artifacts
+
save_good_tree
diff --git a/ci/test-documentation.sh b/ci/test-documentation.sh
index 3d62e6c95..a20de9ca1 100755
--- a/ci/test-documentation.sh
+++ b/ci/test-documentation.sh
@@ -18,6 +18,9 @@ test -s Documentation/git.xml
test -s Documentation/git.1
grep '<meta name="generator" content="AsciiDoc ' Documentation/git.html
+rm -f stdout.log stderr.log
+check_unignored_build_artifacts
+
# Build docs with AsciiDoctor
make clean
make --jobs=2 USE_ASCIIDOCTOR=1 doc > >(tee stdout.log) 2> >(tee stderr.log >&2)
@@ -26,4 +29,7 @@ sed '/^GIT_VERSION = / d' stderr.log
test -s Documentation/git.html
grep '<meta name="generator" content="Asciidoctor ' Documentation/git.html
+rm -f stdout.log stderr.log
+check_unignored_build_artifacts
+
save_good_tree