Skip to content

Commit 5443482

Browse files
committed
Merge branch 'main' of https://github.com/githubnext/gh-aw
2 parents cf41373 + af6b712 commit 5443482

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

scripts/changeset.js

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,15 @@ async function runRelease(releaseType) {
505505
console.log(` [${cs.bumpType}] ${extractFirstLine(cs.description)}`);
506506
}
507507

508+
// Ask for confirmation before making any changes
509+
console.log('');
510+
const confirmed = await promptConfirmation(formatInfoMessage('Proceed with creating the release (update files, commit, tag, and push)?'));
511+
512+
if (!confirmed) {
513+
console.log(formatInfoMessage('Release cancelled. No changes have been made.'));
514+
return;
515+
}
516+
508517
// Update changelog
509518
updateChangelog(versionString, changesets, false);
510519

@@ -515,16 +524,6 @@ async function runRelease(releaseType) {
515524
console.log(formatSuccessMessage('Updated CHANGELOG.md'));
516525
console.log(formatSuccessMessage(`Removed ${changesets.length} changeset file(s)`));
517526

518-
// Ask for confirmation before git operations
519-
console.log('');
520-
const confirmed = await promptConfirmation(formatInfoMessage('Proceed with creating the release (commit, tag, and push)?'));
521-
522-
if (!confirmed) {
523-
console.log(formatInfoMessage('Release cancelled. CHANGELOG.md has been updated but no git operations were performed.'));
524-
console.log(formatInfoMessage('You can manually complete the release later or revert the changelog changes.'));
525-
return;
526-
}
527-
528527
// Execute git operations
529528
console.log('');
530529
console.log(formatInfoMessage('Executing git operations...'));

0 commit comments

Comments
 (0)