fix(build): remove skip-if-unchanged in lockstep stable cut

The skip-if-no-source-changes-since-latest-tag check in
promote_release was a relic of per-tool independent versioning.
In the lockstep era it actively breaks CI re-cuts at a tag commit:

  - HEAD is at the v0.0.10 release commit
  - latest archive-v* tag is archive-v0.0.10 (== HEAD)
  - git diff archive-v0.0.10 HEAD = empty
  - SKIP archive promote → no archive_v0.0.10.html written
  - dist/release-output/ stays at whatever was seeded from
    /srv/zddc/releases/ (i.e. v0.0.9 from the previous deploy)
  - ./deploy --releases rsyncs that → live site STAYS at v0.0.9

Symptom: tag-triggered Forgejo deploy-release.yml workflow runs
(run 16) reports success but /srv/zddc/releases/archive_stable.html
still points at archive_v0.0.9.html.

Fix: always run _promote_stable for every tool on a stable cut.
The bytes written are deterministic at the same source, so
overwriting an existing per-version file is a no-op on disk —
the actual work the cut performs is advancing the symlink chain
(_v<X.Y>, _v<X>, _stable, _beta, _alpha) to the new version.
This commit is contained in:
ZDDC 2026-05-03 18:37:03 -05:00
parent 2f9f26a544
commit b47b5222af

View file

@ -314,13 +314,18 @@ promote_release() {
echo "promote_release: stable channel but no build_version" >&2 echo "promote_release: stable channel but no build_version" >&2
return 1 return 1
fi fi
_latest=$(git -C "$root_dir" tag --list "${_tool}-v*" 2>/dev/null \ # Lockstep: every release cut writes per-version files for
| grep -E "^${_tool}-v[0-9]+\.[0-9]+\.[0-9]+\$" \ # every tool, even when a tool's source hasn't changed since
| sort -V | tail -1) # its last tag. The bytes are identical (build is deterministic
if [ -n "$_latest" ] && git -C "$root_dir" diff --quiet "$_latest" HEAD -- . ../shared 2>/dev/null; then # at the same source), so the overwrite is a no-op on disk;
echo "${_tool}: no source changes since $_latest — skipping" # but the symlink chain (_v<X.Y>, _v<X>, _stable, _beta, _alpha)
return 0 # gets advanced to the new version, which is the actual goal.
fi #
# The previous "skip if no source changes since $_latest" check
# was a relic of per-tool independent versioning. It broke
# CI re-cuts at a tag commit (HEAD == latest tag → diff empty
# → skip → dist/release-output/ stays seeded at the previous
# version → deploy publishes the previous version).
_promote_stable "$_tool" "$build_version" "$_releases_dir" _promote_stable "$_tool" "$build_version" "$_releases_dir"
;; ;;
alpha | beta) alpha | beta)