Skip to content

Commit

Permalink
fix publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
feedthejim committed Oct 26, 2023
1 parent 92b4d67 commit 0bcba46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/start-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ async function waitForPrompt(cp, rawAssertion, timeout = 3000) {
})
}

const SEMVER_TYPES = ['patch', 'minor', 'major']

async function main() {
const args = process.argv
const releaseType = args[args.indexOf('--release-type') + 1]
Expand All @@ -86,9 +88,9 @@ async function main() {
console.log(`Invalid release type ${releaseType}, must be stable or canary`)
return
}
if (!isCanary && !['patch', 'minor', 'stable'].includes(semverType)) {
if (!isCanary && !SEMVER_TYPES.includes(semverType)) {
console.log(
`Invalid semver type ${semverType}, must be one of ${semverType.join(
`Invalid semver type ${semverType}, must be one of ${SEMVER_TYPES.join(
', '
)}`
)
Expand Down

0 comments on commit 0bcba46

Please sign in to comment.