From b47b5222af60304985bcaa6871ae9b3197cc3627 Mon Sep 17 00:00:00 2001 From: ZDDC Date: Sun, 3 May 2026 18:37:03 -0500 Subject: [PATCH] fix(build): remove skip-if-unchanged in lockstep stable cut MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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, _v, _stable, _beta, _alpha) to the new version. --- shared/build-lib.sh | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/shared/build-lib.sh b/shared/build-lib.sh index eee362e..26259c3 100755 --- a/shared/build-lib.sh +++ b/shared/build-lib.sh @@ -314,13 +314,18 @@ promote_release() { echo "promote_release: stable channel but no build_version" >&2 return 1 fi - _latest=$(git -C "$root_dir" tag --list "${_tool}-v*" 2>/dev/null \ - | grep -E "^${_tool}-v[0-9]+\.[0-9]+\.[0-9]+\$" \ - | sort -V | tail -1) - if [ -n "$_latest" ] && git -C "$root_dir" diff --quiet "$_latest" HEAD -- . ../shared 2>/dev/null; then - echo "${_tool}: no source changes since $_latest — skipping" - return 0 - fi + # Lockstep: every release cut writes per-version files for + # every tool, even when a tool's source hasn't changed since + # its last tag. The bytes are identical (build is deterministic + # at the same source), so the overwrite is a no-op on disk; + # but the symlink chain (_v, _v, _stable, _beta, _alpha) + # gets advanced to the new version, which is the actual goal. + # + # 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" ;; alpha | beta)