Skip to content

Commit 8d2ba4d

Browse files
committed
chore: add confirmation step when generating the changelog
1 parent b22b062 commit 8d2ba4d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scripts/release.js

+12-2
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ async function main() {
5656

5757
console.log(tag)
5858

59-
const { yes } = await prompt({
59+
const { yes: tagOk } = await prompt({
6060
type: 'confirm',
6161
name: 'yes',
6262
message: `Releasing v${targetVersion} with the "${tag}" tag. Confirm?`
6363
})
6464

65-
if (!yes) {
65+
if (!tagOk) {
6666
return
6767
}
6868

@@ -82,6 +82,16 @@ async function main() {
8282
step('\nGenerating the changelog...')
8383
await run('yarn', ['changelog'])
8484

85+
const { yes: changelogOk } = await prompt({
86+
type: 'confirm',
87+
name: 'yes',
88+
message: `Changelog generated. Does it look good?`
89+
})
90+
91+
if (!changelogOk) {
92+
return
93+
}
94+
8595
// Commit changes to the Git.
8696
step('\nCommitting changes...')
8797
await run('git', ['add', '-A'])

0 commit comments

Comments
 (0)