]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
build-sys: fail build for untracked files
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 22 Dec 2023 22:31:39 +0000 (23:31 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Fri, 22 Dec 2023 22:32:11 +0000 (23:32 +0100)
All build artifacts should be covered by a gitignore entry.
Validate that at build-time.

Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
.github/workflows/cibuild.sh

index be466daa25a9167d78e10751f7c68c06d9333a7a..1b5a3db67c5fa08d5083ccbd3a2e36e8e205c646 100755 (executable)
@@ -120,6 +120,13 @@ for phase in "${PHASES[@]}"; do
     MAKE)
         make -j"$(nproc)"
         make -j"$(nproc)" check-programs
+
+        untracked_files="$(git ls-files --others --exclude-standard)"
+        if [ -n "$untracked_files" ]; then
+                echo "Untracked files"
+                echo "$untracked_files"
+                exit 1
+        fi
         ;;
     INSTALL)
         make install DESTDIR=/tmp/dest