File tree Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Expand file tree Collapse file tree 1 file changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,31 @@ const fs = require('fs');
2
2
const _ = require ( 'lodash' ) ;
3
3
const childProcess = require ( 'child_process' ) ;
4
4
const fetch = require ( 'node-fetch' ) ;
5
+ const readline = require ( 'readline' ) ;
5
6
6
- const GITHUB_TOKEN = 'bbb2a40e413ca175fc2a91f2aec8e46586da5279' ;
7
- const LATEST_VERSION = '5.14.0' ;
8
- const NEW_VERSION = '5.15.0' ;
9
-
7
+ const GITHUB_TOKEN = 'a0e1c50d4d4859bf5007453335c64e9f66d13ece' ;
8
+ let LATEST_VERSION = '5.14.0' ;
9
+ let NEW_VERSION = '5.15.0' ;
10
10
let releaseNotes ;
11
11
12
- run ( ) ;
12
+ const rl = readline . createInterface ( {
13
+ input : process . stdin ,
14
+ output : process . stdout
15
+ } ) ;
16
+
17
+ rl . question ( `What is the current version? ` , currentVersion => {
18
+ rl . question ( 'What is the next version for release? ' , newVersion => {
19
+ LATEST_VERSION = currentVersion ;
20
+ NEW_VERSION = newVersion ;
21
+ rl . close ( ) ;
22
+ } ) ;
23
+ } ) ;
24
+
25
+ rl . on ( 'close' , ( ) => {
26
+ console . info ( `Current latest version is v${ LATEST_VERSION } ` ) ;
27
+ console . info ( `Generating release notes out or PRs for v${ NEW_VERSION } ` ) ;
28
+ run ( ) ;
29
+ } ) ;
13
30
14
31
async function run ( ) {
15
32
const latestReleaseDate = await fetchLatestReleaseDate ( LATEST_VERSION ) ;
You can’t perform that action at this time.
0 commit comments