Skip to content

chore(ci): drop co-incident tags in backfill-release-notes so it picks the right baseline#5321

Merged
avallete merged 1 commit into
developfrom
claude/fix-backfill-coincident-tags
May 20, 2026
Merged

chore(ci): drop co-incident tags in backfill-release-notes so it picks the right baseline#5321
avallete merged 1 commit into
developfrom
claude/fix-backfill-coincident-tags

Conversation

@avallete
Copy link
Copy Markdown
Member

Fixes bun apps/cli/scripts/backfill-release-notes.ts --tag v2.100.0-beta.2, which currently errors with semantic-release did not compute a next release for v2.100.0-beta.2.

Why it fails today

semantic-release's lastRelease picker accepts both prerelease tags on the branch's channel and stable tags via the prerelease filter's stable-fallback clause, then sorts the survivors by semver. When a stable and a beta share a commit (e.g. v2.100.0 and v2.100.0-beta.2 are both at 9a22aff6), the stable wins the sort — and since it points at HEAD itself, semantic-release reports "Found 0 commits since last release" and emits no nextRelease. The script's version-mismatch guard then exits with the "did not compute a next release" error.

Fix

After resolving the target tag's commit, delete every local tag that points at that commit, not just the target. Co-located tags are by definition the same release, and dropping them lets semantic-release fall back to the genuine prior release on the channel (v2.100.0-beta.1 in the example).

Sample output (v2.100.0-beta.2)

$ bun apps/cli/scripts/backfill-release-notes.ts --tag v2.100.0-beta.2
# [2.100.0-beta.2](https://github.com/supabase/cli/compare/v2.100.0-beta.1...v2.100.0-beta.2) (2026-05-20)


### Features

* **cli:** add hidden flag support for legacy commands ([#5278](https://github.com/supabase/cli/issues/5278)) ([9a22aff](https://github.com/supabase/cli/commit/9a22aff6f109ab1577f2b5ef004f1c59fec1f38b)), closes [#5277](https://github.com/supabase/cli/issues/5277)

Regression-checked locally that v2.99.0-beta.2 (where stable and beta are on different commits) and v2.100.1 (stable backfill) still produce the same output as before.


Generated by Claude Code

semantic-release's lastRelease picker accepts both prerelease tags on
the branch's channel and stable tags via the prerelease filter's
stable-fallback clause, then sorts by semver. When a stable and a beta
share a commit (e.g. v2.100.0 and v2.100.0-beta.2 both at 9a22aff),
the stable wins the sort - and since it points at HEAD, there are 0
commits and the script errors with "did not compute a next release".

Delete every local tag that points at the target tag's commit, not
just the target itself. Co-located tags are by definition the same
release, and dropping them lets semantic-release fall back to the
genuine prior release on the channel (v2.100.0-beta.1 in the example).
@avallete avallete requested a review from a team as a code owner May 20, 2026 14:25
@avallete avallete enabled auto-merge (squash) May 20, 2026 14:30
@avallete avallete changed the title fix(ci): drop co-incident tags in backfill-release-notes so it picks the right baseline chore(ci): drop co-incident tags in backfill-release-notes so it picks the right baseline May 20, 2026
@avallete avallete merged commit 88ed52d into develop May 20, 2026
9 checks passed
@avallete avallete deleted the claude/fix-backfill-coincident-tags branch May 20, 2026 14:32
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.

3 participants