Skip to content

Commit 0bcba46

Browse files
committed
fix publish script
1 parent 92b4d67 commit 0bcba46

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/start-release.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ async function waitForPrompt(cp, rawAssertion, timeout = 3000) {
7676
})
7777
}
7878

79+
const SEMVER_TYPES = ['patch', 'minor', 'major']
80+
7981
async function main() {
8082
const args = process.argv
8183
const releaseType = args[args.indexOf('--release-type') + 1]
@@ -86,9 +88,9 @@ async function main() {
8688
console.log(`Invalid release type ${releaseType}, must be stable or canary`)
8789
return
8890
}
89-
if (!isCanary && !['patch', 'minor', 'stable'].includes(semverType)) {
91+
if (!isCanary && !SEMVER_TYPES.includes(semverType)) {
9092
console.log(
91-
`Invalid semver type ${semverType}, must be one of ${semverType.join(
93+
`Invalid semver type ${semverType}, must be one of ${SEMVER_TYPES.join(
9294
', '
9395
)}`
9496
)

0 commit comments

Comments
 (0)