File tree 3 files changed +10
-4
lines changed
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ const releaseOptions = {
32
32
startLTS : {
33
33
describe : 'Mark the release as the transition from Current to LTS' ,
34
34
type : 'boolean'
35
+ } ,
36
+ releaseDate : {
37
+ describe : 'Default relase date when --prepare is used. It must be YYYY-MM-DD' ,
38
+ type : 'string'
35
39
}
36
40
} ;
37
41
Original file line number Diff line number Diff line change @@ -224,6 +224,8 @@ Options:
224
224
--security Demarcate the new security release as a security release [boolean]
225
225
--startLTS Mark the release as the transition from Current to LTS [boolean]
226
226
--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]
227
229
```
228
230
229
231
### Example
@@ -462,7 +464,7 @@ It will retrieve all the triaged HackerOne reports and add creates the `vulnerab
462
464
463
465
This command updates the ` vulnerabilities.json ` with target date of the security release.
464
466
Example:
465
-
467
+
466
468
``` sh
467
469
git node security --update-date=2023/12/31
468
470
```
@@ -471,7 +473,7 @@ Example:
471
473
472
474
This command creates a pre-release announcement for the security release.
473
475
Example:
474
-
476
+
475
477
``` sh
476
478
git node security --pre-release
477
479
```
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export default class ReleasePreparation extends Session {
25
25
this . isLTS = false ;
26
26
this . isLTSTransition = argv . startLTS ;
27
27
this . runBranchDiff = ! argv . skipBranchDiff ;
28
+ this . defaultReleaseDate = argv . releaseDate ?? new Date ( ) . toISOString ( ) . slice ( 0 , 10 ) ;
28
29
this . ltsCodename = '' ;
29
30
this . date = '' ;
30
31
this . filterLabels = argv . filterLabel && argv . filterLabel . split ( ',' ) ;
@@ -241,9 +242,8 @@ export default class ReleasePreparation extends Session {
241
242
cli . stopSpinner ( 'Updated REPLACEME items in docs' ) ;
242
243
243
244
// Fetch date to use in release commit & changelogs.
244
- const todayDate = new Date ( ) . toISOString ( ) . split ( 'T' ) [ 0 ] ;
245
245
this . date = await cli . prompt ( 'Enter release date in YYYY-MM-DD format:' ,
246
- { questionType : 'input' , defaultAnswer : todayDate } ) ;
246
+ { questionType : 'input' , defaultAnswer : this . defaultReleaseDate } ) ;
247
247
248
248
cli . startSpinner ( 'Updating CHANGELOG.md' ) ;
249
249
await this . updateMainChangelog ( ) ;
You can’t perform that action at this time.
0 commit comments