Skip to content

Bump omarchy-mac's version only in a release's own pull request - #30

Merged
scottjones merged 1 commit into
mainfrom
policy/release-sets-version
Nov 18, 2026
Merged

scottjones merged 1 commit into
mainfrom
policy/release-sets-version

Conversation

@scottjones

@scottjones scottjones commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

PRs that each bump omarchy-mac/version keep colliding (#23 and #24 on 0.1.1, #21 and #28 on 0.1.3) or forget to bump. Only a release reads the number, through the recipe's pkgver, so the release sets it.

 ## Releases
-- bump omarchy-mac/version in the PR that changes behaviour
+- PRs don't touch it; a release bumps it in its own PR from release/omarchy-mac-<version>
+- new CI gate: any other PR that changes omarchy-mac/version fails

The README stops repeating the number. A follow-up teaches tools/release/mac-release --bump patch|minor to open the bump PR, with a manual Action for it.

Evidence

  • Before: a feature PR bumping the version passes CI.
    After: the gate fails it, and passes the release bump PR, PRs that leave the version alone, and pushes to main. Checked against eight scratch cases on current main: a release branch whose name doesn't match the new version, or that changes another file too, fails; push and manual runs pass.

Merge Danger

Door: two-way

Open PRs that bump the version fail the gate until they drop the bump: #21, #33, #72, #90, #94, #97, #125, #131, #134, #135, #144, #145, #152, #155 and #157 today. #140 already leaves it alone and relies on this rule. PRs merged before this kept their bumps; main is at 0.2.6.

Blast Radius: process

🤖 Generated with Claude Code

@maralcbr maralcbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @scottjones, I'm OK with this. #21, #32 and #33 all bumping 0.1.3 → 0.1.4 make the case on their own.

  • I merged main into the branch to clear the conflict (omarchy-mac/README.md line 3, where main said 0.1.3); I kept your sentence and main's other README edits.
  • Edge doesn't lose anything: mac-release re-pins the same version with the next pkgrel, which the omacom recipe already allows. Could the Releases section say when to cut a version bump and when to just re-pin with a pkgrel increment? Otherwise "a release" is undefined while fixes keep landing on edge.
  • Non-blocking: the gate accepts any value in a release PR, so a lower or non-pkgver version (0.0.9, banana) passes. Nothing ships wrong, because the next mac-release pin refuses it. But by then it's on main, and only another release PR can fix it. Checking it here, with the same pkgver pattern and version_newer comparison against HEAD^1 that tools/release uses, catches it in the PR that made the mistake.
  • Since contributors no longer pick the number, could feature PRs say whether they're patch, minor or major in the body? #12 went to 0.2.0 for a reason, and the releaser needs that.
  • The Merge Danger list is out of date: #28 is merged, and #32 and #33 also bump. Those PRs only fail once their checks re-run after this lands.
  • nit: AGENTS.md prefers a full if/else over an exit in one branch, so the GITHUB_EVENT_NAME early exit could be the first arm of one if/elif/else.

@maralcbr maralcbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scottjones my approval still stands, and the last two weeks make the case better than I could: since Oct 12 main went from 0.1.3 to 0.2.3 through feature PRs, with #12, #32, #54 and #56 all bumping on Oct 24 and #32 bumping twice to stay ahead of the others.

To land it:

  • Merge main in. The only conflict is omarchy-mac/README.md line 3, which now says 0.2.3; your sentence wins.
  • Refresh Merge Danger: #12 and #28 are merged, and #21 and #33 are the open PRs that still bump and will fail the gate.

Still open from my Oct 12 review, none blocking:

  • The gate accepts any value on a release/omarchy-mac-<v> branch, so a downgrade or a non-pkgver string gets onto main and only another release PR fixes it. Checking it against HEAD^1 with the same pkgver pattern and version_newer that tools/release uses would catch it in the PR that made it.
  • The Releases section should say when a release bumps the version and when mac-release just re-pins with a pkgrel, and feature PRs should say patch/minor/major in the body so the releaser can choose.
  • tests.yml has no merge_group trigger and the script exits early on anything but pull_request; fine today, but worth knowing if we turn on a merge queue.

I'll merge once main is in and CI is green.

changed=$(git diff --name-only HEAD^1 HEAD)
if ! grep -qx 'omarchy-mac/version' <<<"$changed"; then
echo "omarchy-mac/version is unchanged."
elif [[ $changed == "omarchy-mac/version" && ${GITHUB_HEAD_REF:-} == "release/omarchy-mac-$(<omarchy-mac/version)" ]]; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This accepts any value from a release/omarchy-mac-<v> branch, downgrades included. A pkgver-pattern and version_newer check against HEAD^1 would stop a bad number before it reaches main. Non-blocking.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. We'll check the new value against HEAD^1 with the same pkgver pattern and version_newer that tools/release uses, in a follow-up PR.

@scottjones

Copy link
Copy Markdown
Collaborator Author

Thanks. Main is merged in (40824ea, and again at fe554ce for #58), with our README sentence kept where main had 0.2.3, and the Merge Danger now lists #21 and #33 as the open PRs that still bump. We'll take the release-branch check, the Releases wording on bump versus re-pin with feature PRs naming patch, minor or major in their body, and the merge queue note in a follow-up so this stays as you approved it.

@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

This PR moves version changes into release-only pull requests.

  • Only release pull requests can change omarchy-mac's version.

scottjones explicitly deferred automatic bump-PR creation to a follow-up. scottjones also acknowledged that open pull requests containing version bumps must remove those bumps to pass the new gate.

Reviews (1) · Last reviewed commit: "Merge main into policy/release-sets-vers..." · Reviewed by Greptile

PRs that each bumped omarchy-mac/version kept colliding (#23 and #24 on
0.1.1, #21 and #28 on 0.1.3) or forgot to bump. Only a release reads the
number, through the recipe's pkgver, so the release now sets it: in a
pull request from release/omarchy-mac-<version> that changes only that
file. A new gate fails any other pull request that touches the file.
The README no longer repeats the number.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@scottjones
scottjones force-pushed the policy/release-sets-version branch from fe554ce to fcdc335 Compare November 18, 2026 15:34
@scottjones
scottjones requested a review from malik-na November 18, 2026 15:34
@scottjones
scottjones merged commit 091a106 into main Nov 18, 2026
6 checks passed
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.

2 participants