mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-06 19:17:28 +01:00
ci(block): release job refuses an asset whose binaries are not executable
The release job lists the tarball (tar -tvzf) before SHA256SUMS and any upload, and stops unless blockmaster, blockvolume and sw-block are all present with exec bits for owner, group and other. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c1c7679a29
commit
90f6d7cfea
2 files changed
+36
-1
No files matched your search
@@ -138,6 +138,22 @@ jobs:
|
||||
cp seaweed-block/deploy/systemd/sw-block.tmpfiles.conf "$out/bin/sw-block.tmpfiles.conf"
|
||||
asset="sw-block-${version}-linux-amd64.tar.gz"
|
||||
tar -C "$out/bin" -czf "$out/$asset" blockmaster blockvolume sw-block sw-block.tmpfiles.conf
|
||||
# Before any upload: every binary in the asset is executable as shipped (tar tvf).
|
||||
executables=0
|
||||
while read -r perms _ _ _ _ name; do
|
||||
case "$name" in
|
||||
blockmaster|blockvolume|sw-block)
|
||||
if [[ ! "$perms" =~ ^-..x..x..x$ ]]; then
|
||||
echo "refusing to publish: $name in $asset is $perms, not executable" >&2
|
||||
exit 1
|
||||
fi
|
||||
executables=$((executables + 1)) ;;
|
||||
esac
|
||||
done < <(tar -tvzf "$out/$asset")
|
||||
if [ "$executables" != 3 ]; then
|
||||
echo "refusing to publish: $asset lists $executables of 3 binaries" >&2
|
||||
exit 1
|
||||
fi
|
||||
(cd "$out" && sha256sum "$asset" >SHA256SUMS)
|
||||
prerelease=false
|
||||
if [[ "$version" == *-* ]]; then prerelease=true; fi
|
||||
|
||||
Reference in new issue
Block a user