]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fail the build if it updates any of the files in the git repository
authorOndřej Surý <ondrej@sury.org>
Tue, 7 Jul 2020 14:15:59 +0000 (16:15 +0200)
committerOndřej Surý <ondrej@isc.org>
Wed, 8 Jul 2020 09:05:24 +0000 (11:05 +0200)
There are still some pregenerated files left in the git
repository (cleaned up during `make maintainer-clean`) and we currently
don't notice if any of those needs to be updated in the git repository
because we ignore changes in the repository done during the build.

This commit adds a safeguard that fails the build job if the contents of
the git repository gets modified during the build.

.gitlab-ci.yml

index 15a7693b400a36bfac6d27b2d5c0ddd370324679..0366061a71f0edf92d3a089231282f14b97b57bb 100644 (file)
@@ -201,6 +201,7 @@ stages:
     - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1
     - test -z "${RUN_MAKE_INSTALL}" || make install
     - test -z "${RUN_MAKE_INSTALL}" || sh util/check-make-install
+    - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi
   needs:
     - job: autoreconf
       artifacts: true