@@ -31,6 +31,16 @@ async function main() {
31
31
32
32
await checkNPMPermissions ( ) ;
33
33
34
+ const sha = await getPreviousCommitSha ( ) ;
35
+ const [ shortCommitLog , formattedCommitLog ] = await getCommitLog ( sha ) ;
36
+
37
+ console . log ( '' ) ;
38
+ console . log (
39
+ 'This release includes the following commits:' ,
40
+ chalk . gray ( shortCommitLog )
41
+ ) ;
42
+ console . log ( '' ) ;
43
+
34
44
const releaseType = await getReleaseType ( ) ;
35
45
36
46
const path = join ( ROOT_PATH , PACKAGE_PATHS [ 0 ] ) ;
@@ -41,6 +51,10 @@ async function main() {
41
51
? `${ major } .${ minor + 1 } .0`
42
52
: `${ major } .${ minor } .${ patch + 1 } ` ;
43
53
54
+ updateChangelog ( nextVersion , formattedCommitLog ) ;
55
+
56
+ await reviewChangelogPrompt ( ) ;
57
+
44
58
updatePackageVersions ( previousVersion , nextVersion ) ;
45
59
updateManifestVersions ( previousVersion , nextVersion ) ;
46
60
@@ -52,13 +66,6 @@ async function main() {
52
66
) ;
53
67
console . log ( '' ) ;
54
68
55
- const sha = await getPreviousCommitSha ( ) ;
56
- const commitLog = await getCommitLog ( sha ) ;
57
-
58
- updateChangelog ( nextVersion , commitLog ) ;
59
-
60
- await reviewChangelogPrompt ( ) ;
61
-
62
69
await commitPendingChanges ( previousVersion , nextVersion ) ;
63
70
64
71
printFinalInstructions ( ) ;
@@ -89,6 +96,7 @@ async function commitPendingChanges(previousVersion, nextVersion) {
89
96
}
90
97
91
98
async function getCommitLog ( sha ) {
99
+ let shortLog = '' ;
92
100
let formattedLog = '' ;
93
101
94
102
const rawLog = await execRead ( `
@@ -103,12 +111,14 @@ async function getCommitLog(sha) {
103
111
const pr = match [ 2 ] ;
104
112
105
113
formattedLog += `\n* ${ title } ([USERNAME](https://github.com/USERNAME) in [#${ pr } ](${ PULL_REQUEST_BASE_URL } ${ pr } ))` ;
114
+ shortLog += `\n* ${ title } ` ;
106
115
} else {
107
116
formattedLog += `\n* ${ line } ` ;
117
+ shortLog += `\n* ${ line } ` ;
108
118
}
109
119
} ) ;
110
120
111
- return formattedLog ;
121
+ return [ shortLog , formattedLog ] ;
112
122
}
113
123
114
124
async function getPreviousCommitSha ( ) {
0 commit comments