diff --git a/components/git/release.js b/components/git/release.js index 6c340bf2..d87e92b4 100644 --- a/components/git/release.js +++ b/components/git/release.js @@ -17,6 +17,10 @@ const releaseOptions = { describe: 'Promote new release of Node.js', type: 'boolean' }, + releaseDate: { + describe: 'Default relase date when --prepare is used. It must be YYYY-MM-DD', + type: 'string' + }, security: { describe: 'Demarcate the new security release as a security release', type: 'boolean' @@ -33,9 +37,10 @@ const releaseOptions = { describe: 'Mark the release as the transition from Current to LTS', type: 'boolean' }, - releaseDate: { - describe: 'Default relase date when --prepare is used. It must be YYYY-MM-DD', - type: 'string' + yes: { + type: 'boolean', + default: false, + describe: 'Skip all prompts and run non-interactively' } }; @@ -70,6 +75,10 @@ function release(state, argv) { const cli = new CLI(logStream); const dir = process.cwd(); + if (argv.yes) { + cli.setAssumeYes(); + } + return runPromise(main(state, argv, cli, dir)).catch((err) => { if (cli.spinner.enabled) { cli.spinner.fail(); diff --git a/docs/git-node.md b/docs/git-node.md index 3d86a1c7..81149268 100644 --- a/docs/git-node.md +++ b/docs/git-node.md @@ -223,6 +223,7 @@ Options: --prepare Prepare a new release of Node.js [boolean] --security Demarcate the new security release as a security release [boolean] --startLTS Mark the release as the transition from Current to LTS [boolean] + --yes Skip all prompts and run non-interactively [boolean] --filterLabel Filter PR by label when preparing a security release [string] --releaseDate Default relase date when --prepare is used. It must be YYYY-MM-DD [string]