From fa15c6023adc57e9bb252cbfbbd0640ffb5eb27c Mon Sep 17 00:00:00 2001 From: softmaxe <94467584+softmaxe@users.noreply.github.com> Date: Mon, 12 Oct 2026 13:37:52 +0800 Subject: [PATCH] docs: move version-bump default into release procedure Count from the latest release tag instead of the Makefile VERSION, so an untagged VERSION is released rather than skipped. Phrase the default as a patch increment, flag commits that SemVer would bump higher, and keep the rule in one place that AGENTS.md points to. --- AGENTS.md | 4 +--- docs/agents/merge-and-release.md | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 417726f..be604e0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -20,9 +20,7 @@ The five default triage labels, each label string matching its role name. See `d ### Merging and releasing -Merging a pull request or publishing a release follows `docs/agents/merge-and-release.md`. - -When the owner asks to update or bump the version without naming one, bump the patch: add 0.0.1 to the current `VERSION` in the `Makefile` (e.g. 0.0.1 → 0.0.2). This replaces the SemVer choice in step 1 of the release procedure. +Merging a pull request, bumping the version, or publishing a release follows `docs/agents/merge-and-release.md`. ### Domain docs diff --git a/docs/agents/merge-and-release.md b/docs/agents/merge-and-release.md index d1f7f2c..8db9ad2 100644 --- a/docs/agents/merge-and-release.md +++ b/docs/agents/merge-and-release.md @@ -13,7 +13,9 @@ The owner tests every change locally before opening a pull request, so pull requ Pushing a `v*.*.*` tag runs `.github/workflows/release.yml`, which builds the binary, publishes the GitHub Release, and updates `Formula/ferry.rb` in `softmaxe/homebrew-tap`. The workflow refuses tags that are not on `main` or that differ from `VERSION` in the `Makefile`. -1. Choose the next version with SemVer from the commits since the last tag (`git log --oneline "$(git describe --tags --abbrev=0 origin/main)..origin/main"`): a breaking change bumps major, `feat` bumps minor, anything else bumps patch. +1. Choose the next version. When the owner names one, use it. Otherwise count from the latest release tag (`git describe --tags --abbrev=0 origin/main`); when `VERSION` in the `Makefile` is already ahead of that tag, it is the unreleased next version, so release it as is. + - The owner asks to bump the version without naming one: increment the patch number of the tag (v0.0.9 → 0.0.10). When the commits since the tag include a breaking change or a `feat`, tell the owner which bump SemVer would choose. + - Otherwise, apply SemVer to the commits since the tag (`git log --oneline "$(git describe --tags --abbrev=0 origin/main)..origin/main"`): a breaking change bumps major, `feat` bumps minor, anything else bumps patch. 2. Set `VERSION` in the `Makefile` to that version, either in the feature pull request itself or in a pull request titled `chore: release vX.Y.Z`, and merge it as above. 3. Tag the merged commit and push the tag: