Skip to content

Commit ac60d01

Browse files
danielleadamsruyadorno
authored andcommitted
doc: add more commands for cherry-picking and changelog to release docs
PR-URL: #37785 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Pooja D P <[email protected]>
1 parent bd87e19 commit ac60d01

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

doc/guides/releases.md

+22-7
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,10 @@ duplicate or not.
175175
For a list of commits that could be landed in a patch release on v1.x:
176176

177177
```console
178-
$ branch-diff v1.x-staging master --exclude-label=semver-major,semver-minor,dont-land-on-v1.x,backport-requested-v1.x --filter-release --format=simple
178+
$ branch-diff v1.x-staging master --exclude-label=semver-major,semver-minor,dont-land-on-v1.x,backport-requested-v1.x,backport-blocked-v1.x --filter-release --format=simple
179179
```
180180

181-
Previous release commits and version bumps do not need to be
181+
Previously released commits and version bumps do not need to be
182182
cherry-picked.
183183

184184
Carefully review the list of commits:
@@ -187,17 +187,30 @@ Carefully review the list of commits:
187187
* Checking semver status - Commits labeled as `semver-minor` or `semver-major`
188188
should only be cherry-picked when appropriate for the type of release being
189189
made.
190-
* If you think it's risky so should wait for a while, add the `baking-for-lts`
191-
tag.
190+
* If you think it's risky and the change should wait for a while, add the
191+
`baking-for-lts` tag.
192+
193+
When you are ready to cherry-pick commits, you can automate with the following
194+
command. (For semver-minor releases, make sure to remove the `semver-minor` tag
195+
from `exclude-label`.)
196+
197+
```console
198+
$ branch-diff v1.x-staging master --exclude-label=semver-major,semver-minor,dont-land-on-v1.x,backport-requested-v1.x,backport-blocked-v1.x --filter-release --format=sha --reverse | xargs git cherry-pick
199+
```
192200

193201
When cherry-picking commits, if there are simple conflicts you can resolve
194202
them. Otherwise, add the `backport-requested-vN.x` label to the original PR
195203
and post a comment stating that it does not land cleanly and will require a
196204
backport PR. You can refer the owner of the PR to the "[Backporting to Release
197205
Lines](https://github.com/nodejs/node/blob/HEAD/doc/guides/backporting-to-release-lines.md)" guide.
198206

199-
If commits were cherry-picked in this step, check that the test still pass and
200-
push to the staging branch to keep it up-to-date.
207+
If commits were cherry-picked in this step, check that the test still pass.
208+
209+
```console
210+
$ make test
211+
```
212+
213+
Then, push to the staging branch to keep it up-to-date.
201214

202215
```console
203216
$ git push upstream v1.x-staging
@@ -274,9 +287,11 @@ in the repository was not on the current branch you may have to supply a
274287
`--start-ref` argument:
275288

276289
```console
277-
$ changelog-maker --group --start-ref v1.2.2
290+
$ changelog-maker --group --filter-release --start-ref v1.2.2
278291
```
279292

293+
`--filter-release` will remove the release commit from the previous release.
294+
280295
#### Step 2: Update the appropriate doc/changelogs/CHANGELOG_*.md file
281296

282297
There is a separate `CHANGELOG_Vx.md` file for each major Node.js release line.

0 commit comments

Comments
 (0)