File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ const releaseOptions = {
3232 startLTS : {
3333 describe : 'Mark the release as the transition from Current to LTS' ,
3434 type : 'boolean'
35+ } ,
36+ releaseDate : {
37+ describe : 'Default relase date when --prepare is used. It must be YYYY-MM-DD' ,
38+ type : 'string'
3539 }
3640} ;
3741
Original file line number Diff line number Diff line change @@ -224,6 +224,8 @@ Options:
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]
226226 --filterLabel Filter PR by label when preparing a security release [string]
227+ --releaseDate Default relase date when --prepare is used.
228+ It must be YYYY-MM-DD [string]
227229```
228230
229231### Example
@@ -462,7 +464,7 @@ It will retrieve all the triaged HackerOne reports and add creates the `vulnerab
462464
463465This command updates the ` vulnerabilities.json ` with target date of the security release.
464466Example:
465-
467+
466468``` sh
467469 git node security --update-date=2023/12/31
468470```
@@ -471,7 +473,7 @@ Example:
471473
472474This command creates a pre-release announcement for the security release.
473475Example:
474-
476+
475477``` sh
476478 git node security --pre-release
477479```
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export default class ReleasePreparation extends Session {
2525 this . isLTS = false ;
2626 this . isLTSTransition = argv . startLTS ;
2727 this . runBranchDiff = ! argv . skipBranchDiff ;
28+ this . defaultReleaseDate = argv . releaseDate ?? new Date ( ) . toISOString ( ) . slice ( 0 , 10 ) ;
2829 this . ltsCodename = '' ;
2930 this . date = '' ;
3031 this . filterLabels = argv . filterLabel && argv . filterLabel . split ( ',' ) ;
@@ -241,9 +242,8 @@ export default class ReleasePreparation extends Session {
241242 cli . stopSpinner ( 'Updated REPLACEME items in docs' ) ;
242243
243244 // Fetch date to use in release commit & changelogs.
244- const todayDate = new Date ( ) . toISOString ( ) . split ( 'T' ) [ 0 ] ;
245245 this . date = await cli . prompt ( 'Enter release date in YYYY-MM-DD format:' ,
246- { questionType : 'input' , defaultAnswer : todayDate } ) ;
246+ { questionType : 'input' , defaultAnswer : this . defaultReleaseDate } ) ;
247247
248248 cli . startSpinner ( 'Updating CHANGELOG.md' ) ;
249249 await this . updateMainChangelog ( ) ;
You can’t perform that action at this time.
0 commit comments