Skip to content

fix(ci): keep appcast history when a previous release has no assets - #492

Merged
davidpoblador merged 1 commit into
mainfrom
fix/appcast-carry-forward
Jul 30, 2026
Merged

fix(ci): keep appcast history when a previous release has no assets#492
davidpoblador merged 1 commit into
mainfrom
fix/appcast-carry-forward

Conversation

@davidpoblador

Copy link
Copy Markdown
Member

Problem

The appcast step merges items from a previous release so the Homebrew update
popover keeps its history. It picked the most recent release other than the one
being built:

PREV_TAG=$(gh release list --limit 10 --json tagName --jq "[.[] | select(.tagName != \"$TAG_NAME\")][0].tagName")

If that release has no assets, the download fails, || true swallows it, and
generate_appcast.py guards on os.path.exists, so the build happily publishes
an appcast containing only its own item.

That is not hypothetical: it happened on 0.1.78. Its build ran after 0.1.77,
whose build had failed and left the release empty, so the published 0.1.78
appcast has exactly 1 item where it should have had 77.

Sparkle updates still work, since only the newest item matters for updating.
What breaks is the version history.

Fix

Walk back through recent releases until one actually yields an appcast, and emit
a warning instead of truncating silently if none does.

Verification

Ran the new loop against this repository with TAG_NAME=v0.1.78:

Carrying forward appcast items from v0.1.76
items carried forward: 76

It skips the empty v0.1.77 and recovers the history. The old code stopped at
v0.1.77 and carried nothing.

Note this does not retroactively repair the 0.1.78 appcast. The next release
picks up the history again, because v0.1.78 does have an appcast.xml asset, so
it self-heals from here.

The appcast merged items from whichever release was most recent, which is empty
when that release's build failed. The download then failed silently and the new
appcast shipped with only its own item, dropping the history the Homebrew update
popover reads. This happened for 0.1.78, whose appcast lost 76 items.

Walks back through recent releases until one actually yields an appcast, and
warns rather than truncating quietly if none does.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HzGnpFC9q8ydDPD8ygabKv
@davidpoblador
davidpoblador merged commit 92eae05 into main Jul 30, 2026
2 checks passed
@davidpoblador
davidpoblador deleted the fix/appcast-carry-forward branch July 30, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant