Skip to content

Commit 8e602e3

Browse files
atayoezclaude
andcommitted
fix(release): collect the peer's .deb (amd64/arm64 naming) + keep dist clean
Debian arches are amd64/arm64, so the *$PEER_ARCH* collect glob silently missed the peer's .deb (caught by the matrix verify). Scope all collect globs to $VERSION so a stale peer dist/ can't leak old artefacts, start --worker with a fresh dist/, and drop the extracted-bundle scratch dir before the manifest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 1ba21c0 commit 8e602e3

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

scripts/release-local.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,9 @@ case "${1:-}" in
160160
[ -n "${2:-}" ] || die "usage: --pkg-arch <arch>"
161161
setup_repro_env; pkg_arch "$2" "$DIST/sentinel-kde-$VERSION"; exit 0 ;;
162162
--worker) # build+package this host's native arch (used over ssh)
163-
mkdir -p "$DIST"; build_bundle; pkg_deb_rpm
163+
# The worker's dist/ is scratch — start clean so the orchestrator's
164+
# collect globs can't pick up a previous release's artefacts.
165+
rm -rf "$DIST"; mkdir -p "$DIST"; build_bundle; pkg_deb_rpm
164166
command -v makepkg >/dev/null && {
165167
tar -C "$DIST" -xzf "$DIST/sentinel-kde-$VERSION-$LOCAL_ARCH-linux.tar.gz"
166168
pkg_arch "$LOCAL_ARCH" "$DIST/sentinel-kde-$VERSION"; }
@@ -191,7 +193,13 @@ git push -q origin HEAD 2>/dev/null || true
191193
ssh "$PEER_HOST" "cd $REMOTE_REPO && git fetch -q origin && git checkout -q $(git rev-parse HEAD) && scripts/release-local.sh --worker"
192194

193195
c "[3/4] collect $PEER_ARCH artefacts + .pkg for any arch still missing one"
194-
scp -q "$PEER_HOST:$REMOTE_REPO/dist/*$PEER_ARCH*" "$PEER_HOST:$REMOTE_REPO/dist/"'*.pkg.tar.zst' "$DIST/" 2>/dev/null || true
196+
# Debian spells the arches amd64/arm64, so a bare *$PEER_ARCH* glob misses
197+
# the .deb; and every glob is scoped to $VERSION so a stale dist/ on the
198+
# peer can't leak old artefacts into this release.
199+
deb_arch=amd64; [ "$PEER_ARCH" = aarch64 ] && deb_arch=arm64
200+
scp -q "$PEER_HOST:$REMOTE_REPO/dist/*$VERSION*$PEER_ARCH*" \
201+
"$PEER_HOST:$REMOTE_REPO/dist/*$VERSION*$deb_arch*" \
202+
"$PEER_HOST:$REMOTE_REPO/dist/*$VERSION*.pkg.tar.zst" "$DIST/" 2>/dev/null || true
195203
# makepkg cross-packages either arch; run it wherever it exists (local wins).
196204
pkgrel="$(sed -n 's/^pkgrel=//p' packaging-kde/packaging/arch/PKGBUILD)"
197205
for a in x86_64 aarch64; do
@@ -203,9 +211,10 @@ for a in x86_64 aarch64; do
203211
scp -q "$DIST/sentinel-kde-$VERSION-$a-linux.tar.gz" "$PEER_HOST:$REMOTE_REPO/dist/" 2>/dev/null
204212
ssh "$PEER_HOST" "cd $REMOTE_REPO && tar -C dist -xzf dist/sentinel-kde-$VERSION-$a-linux.tar.gz && \
205213
SOURCE_DATE_EPOCH=$(git log -1 --format=%ct) scripts/release-local.sh --pkg-arch $a" 2>/dev/null || true
206-
scp -q "$PEER_HOST:$REMOTE_REPO/dist/*$a*.pkg.tar.zst" "$DIST/" 2>/dev/null || true
214+
scp -q "$PEER_HOST:$REMOTE_REPO/dist/*$VERSION*$a*.pkg.tar.zst" "$DIST/" 2>/dev/null || true
207215
fi
208216
done
217+
rm -rf "$DIST/sentinel-kde-$VERSION" # extracted-bundle scratch dir
209218

210219
c "[4/4] checksums + manifest"
211220
( cd "$DIST" && for f in *.pkg.tar.zst *.deb *.rpm; do [ -f "$f" ] && sha256sum "$f" > "$f.sha256"; done; ls -1 )

0 commit comments

Comments
 (0)