Skip to content

Commit

Permalink
预发布不校验changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
hanaTsuk1 committed Jun 30, 2024
1 parent bf01883 commit 7a32ac0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ program
.addArgument(new Argument('<release>').choices(['major', 'premajor', 'minor', 'preminor', 'patch', 'prepatch', 'prerelease']))
.addOption(new Option('-i, --identifier <version>', 'prerelease identifier').choices(['alpha', 'beta']))
.action(async (release, { identifier }) => {
if (release.startsWith('pre') && !identifier) {
const isPre = release.startsWith('pre')
if (isPre && !identifier) {
console.error('Missing option "identifier"')
return
}
Expand All @@ -51,7 +52,9 @@ program
})
if (!versionConfirm)
return
await checkChangelog(newVersion)
if (!isPre)
await checkChangelog(newVersion)

repleaceVersion(newVersion)
await run('git', ['add', '.'])
await run('git', ['commit', '-m', `release: ${targetVersion}`])
Expand Down

0 comments on commit 7a32ac0

Please sign in to comment.