Skip to content

ci(nightly): version betas as the next patch of the latest stable#51

Merged
BlackHole1 merged 1 commit into
mainfrom
ci/nightly-next-patch-beta-base
Jul 2, 2026
Merged

ci(nightly): version betas as the next patch of the latest stable#51
BlackHole1 merged 1 commit into
mainfrom
ci/nightly-next-patch-beta-base

Conversation

@BlackHole1

Copy link
Copy Markdown
Member

A nightly built after stable X.Y.Z used to be numbered X.Y.Z-beta.N, which semver-sorts below the stable it was built from — the version told the opposite of the truth. The beta base is now the next patch of the latest stable (stable 1.2.3 → nightly 1.2.4-beta.1), so nightlies sort above the stable they follow, and a later stable in turn sorts above all earlier nightlies (1.3.0 > 1.2.4-beta.N, and even 1.2.4 > 1.2.4-beta.N — release beats pre-release). N still continues from the highest existing -beta.* tag for the base; every new stable moves the base and resets N. The base can never collide with an existing stable tag: if vX.Y.(Z+1) existed, it would itself be the latest stable.

Update delivery is untouched: Sparkle orders appcast items by the date-stamped CFBundleVersion, so beta followers already receive a newer stable when one ships (and keep their channel preference across the update) — this change only makes the marketing version tell the same story as the build order. Migration is clean too: the existing old-scheme tags (v1.5.1-beta.*) don't feed the new base, so the first nightly after this lands is simply v1.6.1-beta.1. Verified compute_version.sh against throwaway repos covering the migration state, N continuation/reset, patch > 9 version sorting, backfill rejection, and the re-publish guard.

Two doc corrections the change surfaced are folded in: the Release workflow's version input now says the auto-bump uses the latest stable tag (under the new scheme the newest tag is almost always a beta), and RELEASING.md's failure-recovery advice no longer suggests deleting a stale tag/release — releases are immutable, so a published tag name is burned forever, and compute_version.sh derives both the stable auto-bump and the beta base from live tags, meaning a deletion makes the next run recompute exactly the burned name and fail until a newer version moves past it.

A nightly built after stable X.Y.Z used to be numbered X.Y.Z-beta.N,
which semver-sorts *below* the stable it was built from — the version
told the opposite of the truth. The beta base is now the next patch of
the latest stable (stable 1.2.3 → nightly 1.2.4-beta.1), so nightlies
sort above the stable they follow, and a later stable in turn sorts
above all earlier nightlies. N still continues from the highest
existing `-beta.*` tag for the base; every new stable moves the base
and resets N. The base can never collide with an existing stable tag:
if vX.Y.(Z+1) existed, it would itself be the latest stable.

Update delivery is untouched: Sparkle orders items by the date-stamped
`CFBundleVersion`, so beta followers already receive a newer stable
(and keep their channel preference); this change only makes the
marketing version tell the same story as the build order.

Also fold in two doc corrections the change surfaced: the Release
workflow's version input now says the auto-bump uses the latest
*stable* tag (under the new scheme the newest tag is almost always a
beta), and RELEASING.md's failure-recovery advice no longer suggests
deleting a stale tag/release — releases are immutable, so a published
tag name is burned forever, and `compute_version.sh` derives both the
stable auto-bump and the beta base from live tags, meaning a deletion
makes the next run recompute exactly the burned name and fail until a
newer version moves past it.

Signed-off-by: Kevin Cui <bh@bugs.cc>
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ef233587-7215-4b5f-bf5a-667c8515e78d

📥 Commits

Reviewing files that changed from the base of the PR and between 84ffc96 and c3e6b9d.

📒 Files selected for processing (4)
  • .github/workflows/nightly.yml
  • .github/workflows/release.yml
  • docs/RELEASING.md
  • scripts/ci/compute_version.sh

Summary by CodeRabbit

  • New Features

    • Beta/nightly versioning now follows the next patch after the latest stable release, improving how pre-release builds are numbered.
    • Release creation now clearly uses the latest stable tag when auto-bumping a version.
  • Documentation

    • Clarified release and versioning guidance, including beta/nightly ordering and what to do if a publish run fails after tagging.

Walkthrough

Type: Documentation and script logic update

Description: This change updates the beta versioning scheme so the beta base version is computed as the next patch of the latest stable tag (X.Y.(Z+1)-beta.N) rather than the latest stable version directly. scripts/ci/compute_version.sh was updated to parse the latest stable tag and increment its patch segment before scanning for beta tags. Documentation comments in .github/workflows/nightly.yml, .github/workflows/release.yml, and docs/RELEASING.md were revised to reflect this scheme, including clarified ordering guarantees and Sparkle build-number behavior. docs/RELEASING.md also changes the guidance for a failed publish run: stale tags/releases should now be left in place rather than deleted, with a new version cut instead.

Changes

Cohort / File(s) Change Summary
scripts/ci/compute_version.sh Beta base version now computed as next patch (X.Y.(Z+1)) of latest stable tag; documentation comment updated accordingly.
.github/workflows/nightly.yml, .github/workflows/release.yml, docs/RELEASING.md Comments/docs updated to describe the new beta versioning scheme, ordering guarantees, Sparkle build-number behavior, and revised guidance for handling failed publish runs (leave stale tag/release in place instead of deleting).

Related PRs: None identified.

Suggested labels: documentation, ci

Suggested reviewers: None identified.

Poem
A rabbit hopped through tags anew,
From stable patch, a beta grew.
No more deleting, tags stay put,
compute_version.sh takes root.
Docs now clear, the scheme in view—
next patch plus beta, tried and true. 🐇

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required format and accurately summarizes the beta versioning change.
Description check ✅ Passed The description matches the versioning and documentation updates in the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch ci/nightly-next-patch-beta-base

Comment @coderabbitai help to get the list of available commands.

@BlackHole1 BlackHole1 merged commit f538212 into main Jul 2, 2026
3 checks passed
@BlackHole1 BlackHole1 deleted the ci/nightly-next-patch-beta-base branch July 2, 2026 06:42
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