Fix source tarball creation: write archive outside source tree to avoid tar exit 1
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user