From ba509c547b8d15924da0f7485d2c1ba574dc0daf Mon Sep 17 00:00:00 2001 From: Laan Tungir Date: Sun, 20 Sep 2026 19:15:06 -0400 Subject: [PATCH] Fix source tarball creation: write archive outside source tree to avoid tar exit 1 --- increment_and_push.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/increment_and_push.sh b/increment_and_push.sh index d17f7b0..ecc94ff 100755 --- a/increment_and_push.sh +++ b/increment_and_push.sh @@ -199,13 +199,19 @@ build_release_binary() { create_source_tarball() { local tarball_name="signer-${NEW_VERSION#v}.tar.gz" - if tar -czf "$tarball_name" \ + # Write the archive OUTSIDE the tree being archived. Writing it into the + # current directory makes tar exit 1 with "file changed as we read it", + # which previously caused the tarball to be silently skipped. + local tarball_path + tarball_path="$(mktemp -d)/${tarball_name}" + + if tar -czf "$tarball_path" \ --exclude='target/*' \ --exclude='.git*' \ --exclude='*.log' \ --exclude='*.tar.gz' \ . > /dev/null 2>&1; then - echo "$tarball_name" + echo "$tarball_path" else return 1 fi