fix(build): tighten seed regex to exact-version files only
All checks were successful
Notify chart dev on beta cut / notify-chart-dev (push) Successful in 8s

The release-output seed-from-live pattern used `*_v*.html` (glob),
which matches partial-pin filenames (`<tool>_v<X.Y>.html`,
`<tool>_v<X>.html`) as well as exact-version (`<tool>_v<X.Y.Z>.html`).
After bdd1460 dropped partial pins, their .sig files (real files)
were still being carried into new release bundles as orphans because
the partial-pin .html files (symlinks) weren't seeded but the .sig
files were.

Switch to a strict X.Y.Z regex via find -regextype posix-extended.
Same fix on the zddc-server pattern (anchor on `_<platform>` after
the version). For the v0.0.18 bundle that's already cut, the
orphans were cleaned manually before deploy.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
ZDDC 2026-05-20 09:40:33 -05:00
parent fac6e7f0d6
commit 49866f6353

21
build
View file

@ -130,15 +130,18 @@ if [ "$RELEASE_CHANNEL" = "stable" ]; then
echo "=== Seeding $RELEASES_DIR from $LIVE_RELEASES (per-version artifacts only) ===" echo "=== Seeding $RELEASES_DIR from $LIVE_RELEASES (per-version artifacts only) ==="
rm -rf "$RELEASES_DIR" rm -rf "$RELEASES_DIR"
mkdir -p "$RELEASES_DIR" mkdir -p "$RELEASES_DIR"
# Copy per-version immutable files + their .sig sidecars. The # Copy per-version immutable files + their .sig sidecars only.
# canonical <tool>.html / zddc-server_<plat> symlinks will be # Strict X.Y.Z match avoids picking up legacy partial-version
# rewritten by this cut and old channel/partial-pin files from # pins (_v<X.Y>, _v<X>) that may still be lying around as
# the previous layout (if any still live there) will be cleaned # leftover .sig files in /srv/zddc/releases/ from the pre-
# up by deploy's --delete-after rsync. # simplification layout. The canonical <tool>.html /
find "$LIVE_RELEASES" -maxdepth 1 -type f \( \ # zddc-server_<plat> symlinks will be rewritten by this cut;
-name '*_v*.html' -o \ # anything else (channel mirrors, partial pins, retired tools)
-name '*_v*.html.sig' -o \ # gets cleaned by deploy's --delete-after rsync.
-name 'zddc-server_v*' \ find "$LIVE_RELEASES" -maxdepth 1 -type f -regextype posix-extended \( \
-regex '.*/[a-z-]+_v[0-9]+\.[0-9]+\.[0-9]+\.html' -o \
-regex '.*/[a-z-]+_v[0-9]+\.[0-9]+\.[0-9]+\.html\.sig' -o \
-regex '.*/zddc-server_v[0-9]+\.[0-9]+\.[0-9]+_.*' \
\) -exec cp -a '{}' "$RELEASES_DIR/" \; \) -exec cp -a '{}' "$RELEASES_DIR/" \;
# Also seed the public key (it lives at the releases root). # Also seed the public key (it lives at the releases root).
if [ -f "$LIVE_RELEASES/pubkey.pem" ]; then if [ -f "$LIVE_RELEASES/pubkey.pem" ]; then