Skip to content

Commit 964aa53

Browse files
RafaelGSSaduh95
andauthored
feat: add --yes option to git node release (#862)
* feat: add --yes option to git node release This will enable us to automate release proposal creation: nodejs/security-wg#860 Co-authored-by: Antoine du Hamel <[email protected]>
1 parent 48cbfd6 commit 964aa53

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

components/git/release.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ const releaseOptions = {
1717
describe: 'Promote new release of Node.js',
1818
type: 'boolean'
1919
},
20+
releaseDate: {
21+
describe: 'Default relase date when --prepare is used. It must be YYYY-MM-DD',
22+
type: 'string'
23+
},
2024
security: {
2125
describe: 'Demarcate the new security release as a security release',
2226
type: 'boolean'
@@ -33,9 +37,10 @@ const releaseOptions = {
3337
describe: 'Mark the release as the transition from Current to LTS',
3438
type: 'boolean'
3539
},
36-
releaseDate: {
37-
describe: 'Default relase date when --prepare is used. It must be YYYY-MM-DD',
38-
type: 'string'
40+
yes: {
41+
type: 'boolean',
42+
default: false,
43+
describe: 'Skip all prompts and run non-interactively'
3944
}
4045
};
4146

@@ -70,6 +75,10 @@ function release(state, argv) {
7075
const cli = new CLI(logStream);
7176
const dir = process.cwd();
7277

78+
if (argv.yes) {
79+
cli.setAssumeYes();
80+
}
81+
7382
return runPromise(main(state, argv, cli, dir)).catch((err) => {
7483
if (cli.spinner.enabled) {
7584
cli.spinner.fail();

docs/git-node.md

+1
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ Options:
223223
--prepare Prepare a new release of Node.js [boolean]
224224
--security Demarcate the new security release as a security release [boolean]
225225
--startLTS Mark the release as the transition from Current to LTS [boolean]
226+
--yes Skip all prompts and run non-interactively [boolean]
226227
--filterLabel Filter PR by label when preparing a security release [string]
227228
--releaseDate Default relase date when --prepare is used.
228229
It must be YYYY-MM-DD [string]

0 commit comments

Comments
 (0)