Skip to content

Commit 8f02c22

Browse files
authored
feat(release): support alpha releases (#1224)
* feat(release): support alpha releases Node.js 27 introduces Alpha releases versioned as vN.0.0-alpha.X.Y.Z (see nodejs/node#63135). Teach `git node release` about them: - --prepare detects alpha release lines from the NODE_ALPHA_*_VERSION macros in src/node_version.h, computes the next alpha version from the semver labels of the commits, and accepts --newVersion=N.0.0-alpha.X.Y.Z. - When CHANGELOG_V{N}.md does not exist yet, --prepare creates it, updates the navigation of the other changelogs and the root CHANGELOG.md, and groups the commit list by semver-major, minor and patch. - --newVersion=N.0.0 on an alpha release line prepares the first stable release, removing the alpha macros and relabelling Alpha entries as Current. - --promote validates "(Alpha)" release commits, creates their GitHub releases as pre-releases, and, when promoting N.0.0, bumps main to N+1 with the alpha macros reset to 0. - Fix the "Working on" commit corrupting node_version.h when the patch version goes from 9 to 10. Refs: nodejs/Release#1187 Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> * fixup! feat(release): support alpha releases Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com> --------- Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
1 parent 3239011 commit 8f02c22

9 files changed

Lines changed: 1244 additions & 62 deletions

File tree

‎components/git/release.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ export function builder(yargs) {
8585
'Prepare a new security release of Node.js with auto-determined version')
8686
.example('git node release --prepare --newVersion=1.2.3',
8787
'Prepare a new release of Node.js tagged v1.2.3')
88+
.example('git node release --prepare --newVersion=27.0.0-alpha.0.0.0',
89+
'Prepare the first Alpha release of Node.js 27')
8890
.example('git node release --promote https://github.com/nodejs/node/pull/12345 https://github.com/nodejs/node/pull/54321',
8991
'Promote two prepared releases of Node.js with PR #12345 and #54321')
9092
.example('git node --prepare --startLTS',

‎docs/git-node.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,17 @@ git node release --prepare 1.2.3
243243
git node release --prepare
244244
```
245245

246+
```sh
247+
# Prepare the first Alpha release of a new release line
248+
git node release --prepare 27.0.0-alpha.0.0.0
249+
```
250+
251+
```sh
252+
# Prepare the semver-major release of an Alpha release line, which marks it
253+
# as out of Alpha.
254+
git node release --prepare 27.0.0
255+
```
256+
246257
```sh
247258
# Prepare the first LTS release for a given release line
248259
git node release --prepare --startLTS

0 commit comments

Comments
 (0)