@@ -36,6 +36,14 @@ is what lets you dispatch the workflow.
3636
3737## Steps
3838
39+ The release pull request in step 1 is merged by a person who has reviewed it. Its merge commit is
40+ what step 2 dispatches, tags, and pushes to RubyGems, and none of that can be taken back — so
41+ prepare that pull request and stop there, rather than merging it and carrying on to step 2.
42+
43+ The bump that starts a new minor is the only other pull request that sets ` RBS::VERSION ` . It
44+ publishes nothing and another bump undoes it, so one opened on an explicit request can go through
45+ on its own.
46+
3947### 1. Prepare the release
4048
4149Open a pull request that carries everything the release needs:
@@ -142,13 +150,67 @@ Checking the `dry_run` box runs everything up to the artifact and stops — no t
142150no release — which is how the build is exercised without releasing. ` version ` still has to match
143151the commit, so a dry run is also how a release is rehearsed before it is cut.
144152
145- ### 3. Start the next development cycle
153+ ## The version on ` master `
146154
147- Open another pull request setting ` RBS::VERSION ` to the next prerelease (` 4.1.1 ` → ` 4.1.2.pre ` ),
148- with ` Gemfile.lock ` regenerated, labeled ` skip-changelog ` like the release pull request itself.
149- Without it the version on ` master ` keeps claiming to be the released version for the whole
150- development period, and ` rake gem:changelog ` reads that version to decide where the next changelog
151- starts.
155+ ` RBS::VERSION ` on ` master ` is read one of two ways, told apart by how the version ends:
156+
157+ | On ` master ` | Means |
158+ | --- | --- |
159+ | ` X.Y.0.dev ` — a bare ` .dev ` | ` X.Y.0 ` is being developed |
160+ | A complete version — ` X.Y.Z ` , ` X.Y.Z.pre.N ` , ` X.Y.Z.dev.N ` | The version * after* the one named is being developed |
161+
162+ So ` 4.1.1 ` on ` master ` is not a claim that ` master ` is 4.1.1. It says 4.1.1 has shipped and what
163+ comes after it is being worked on. ` 4.1.2.dev.1 ` says the same thing about itself: that release is
164+ out, and the line continues towards 4.1.2.
165+
166+ Both become true the moment the release is tagged, so ** nothing has to be done to ` master ` after a
167+ release** . ` 4.0.1 ` was followed by ` 4.0.2 ` with no version change in between, and ` 4.1.2.dev.1 ` is
168+ what ` master ` carries today.
169+
170+ The bare ` X.Y.0.dev ` is the exception because it is the one version that names a target rather than
171+ a predecessor: a new minor is developed towards ` X.Y.0 ` for a long time, before it is known whether
172+ the next thing to ship is ` X.Y.0.pre.1 ` or ` X.Y.0 ` itself. Setting it is the only version change
173+ that has to be made deliberately.
174+
175+ ` rake gem:changelog ` reads ` RBS::VERSION ` too, to decide where the next changelog starts — but the
176+ version is set to the one being released before the changelog is generated, so it sees that rather
177+ than whatever ` master ` was carrying.
178+
179+ ## Starting a new minor
180+
181+ ` master ` is the development line of one minor at a time. Moving it from ` X.Y ` to ` X.(Y+1) ` is not
182+ part of any one release — it is the decision that the ` X.Y ` line is done, taken whenever that
183+ becomes true — and it is the one moment the version on ` master ` is changed by hand. Two changes, in
184+ opposite places:
185+
186+ 1 . ** Branch the line being left behind** , from the last ` master ` commit that belongs to it:
187+
188+ ``` console
189+ $ git switch --create aaa-X.Y.x <that commit>
190+ $ git push -u origin aaa-X.Y.x
191+ ```
192+
193+ Branch from the commit * before* the bump below, so the branch keeps the version its line was
194+ released under. Patch releases of ` X.Y ` are cut from here from now on, with their changes
195+ cherry-picked from ` master ` — see [ Backports] ( #backports ) . The ` aaa- ` prefix carries no meaning
196+ beyond sorting the release branches to the top of the branch list.
197+
198+ 2 . ** Bump ` master ` ** to ` X.(Y+1).0.dev ` , in a pull request with ` Gemfile.lock ` regenerated and
199+ labeled ` skip-changelog ` like the release pull request itself. ` 4.1 ` was started exactly this
200+ way: ` aaa-4.0.x ` was branched at the commit before ` Start 4.1 development ` , which set
201+ ` RBS::VERSION ` to ` 4.1.0.dev ` .
202+
203+ Two loose ends that are easy to forget:
204+
205+ - ** The release note of the new line.** ` rake gem:gh_release ` links every published release to
206+ ` https://github.com/ruby/rbs/wiki/Release-Note-X.Y ` , built from the version number without
207+ checking that the page is there. Nothing has to be written when the line starts — the page comes
208+ together as the first release proper of the line comes into view — but it does have to exist by
209+ the time that release is published, or its notes link to an empty page.
210+ - ** Release branches that are done.** A branch is worth keeping only while its line might still
211+ get a patch. The ones that exist do not cover every line that ever had one — ` 3.8.1 ` shipped and
212+ there is no ` aaa-3.8.x ` — so this is housekeeping rather than a rule, but starting a new minor is
213+ the natural moment to look at the bottom of the branch list and delete what has been superseded.
152214
153215## Backports
154216
@@ -170,8 +232,11 @@ that is why the 4.0.3 changelog credits its three entries to the same pull reque
170232- Prereleases (` X.Y.Z.pre.N ` ) are only installed with ` gem install rbs --pre ` ;
171233 a plain ` gem install rbs ` is unaffected. On JRuby, ` gem install rbs [--pre] `
172234 resolves to the ` -java ` gem automatically.
173- - ` Dockerfile.jruby ` pins the WASI SDK / Chicory / ASM versions to match the
174- ` wasm ` , ` jruby ` , and ` release-gems ` workflows. Keep them in sync when bumping.
235+ - The WASI SDK version is pinned in ` wasm.yml ` , ` jruby.yml ` , ` release-gems.yml ` , and
236+ ` Dockerfile.jruby ` , each carrying its own copy. Keep them in sync when bumping. The
237+ Chicory/ASM versions are not duplicated: they are the ` jar ` requirements in
238+ ` rbs.gemspec ` , which is where the workflow, ` Dockerfile.jruby ` and ` gem install ` all
239+ read them from.
175240- ` rake 'gem:check_release[X.Y.Z]' ` and ` rake gem:tag ` are what the workflow runs to
176241 check the release and to create the tag. Both work locally, which is the fallback
177242 if the tag ever has to be created by hand.
0 commit comments