From 1c294172acd87c0e350913b9f2de8f0cfe50a89c Mon Sep 17 00:00:00 2001 From: Kia King Ishii Date: Fri, 20 Nov 2020 20:18:32 +0900 Subject: [PATCH] chore: add comfirmation step on release after generating the changelog --- scripts/release.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/release.js b/scripts/release.js index ad14fdf3..b9b13aa7 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -52,13 +52,13 @@ async function main() { console.log(tag) - const { yes } = await prompt({ + const { yes: tagOk } = await prompt({ type: 'confirm', name: 'yes', message: `Releasing v${targetVersion} with the "${tag}" tag. Confirm?` }) - if (!yes) { + if (!tagOk) { return } @@ -74,6 +74,16 @@ async function main() { step('\nGenerating the changelog...') await run('yarn', ['changelog']) + const { yes: changelogOk } = await prompt({ + type: 'confirm', + name: 'yes', + message: `Changelog generated. Does it look good?` + }) + + if (!changelogOk) { + return + } + // Commit changes to the Git. step('\nCommitting changes...') await run('git', ['add', '-A'])