From e74e2ca9ffa24d1cfdbc0843bdef0a88c74c17f1 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 22 Sep 2024 22:41:12 +0200 Subject: [PATCH] Prevent build from modifying the source code tree --- docker/packager/binary-builder/build.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/packager/binary-builder/build.sh b/docker/packager/binary-builder/build.sh index ba9311c6880..f18a6c2a798 100755 --- a/docker/packager/binary-builder/build.sh +++ b/docker/packager/binary-builder/build.sh @@ -97,6 +97,10 @@ cmake --debug-trycompile -DCMAKE_VERBOSE_MAKEFILE=1 -LA "-DCMAKE_BUILD_TYPE=$BUI # shellcheck disable=SC2086 # No quotes because I want it to expand to nothing if empty. ninja $NINJA_FLAGS $BUILD_TARGET +# We don't allow dirty files in the source directory after build +git ls-files --others --exclude-standard | grep . && echo "^ Dirty files in the working copy after build" && exit 1 +git submodule foreach --quiet git ls-files --others --exclude-standard | grep . && echo "^ Dirty files in submodules after build" && exit 1 + ls -la ./programs ccache_status