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:
parent
2f9f26a544
commit
b47b5222af
1 changed files with 12 additions and 7 deletions
|
|
@ -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<X.Y>, _v<X>, _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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue