Commit 0bcba460 authored by Jimmy Lai's avatar Jimmy Lai

fix publish script

parent 92b4d673
...@@ -76,6 +76,8 @@ async function waitForPrompt(cp, rawAssertion, timeout = 3000) { ...@@ -76,6 +76,8 @@ async function waitForPrompt(cp, rawAssertion, timeout = 3000) {
}) })
} }
const SEMVER_TYPES = ['patch', 'minor', 'major']
async function main() { async function main() {
const args = process.argv const args = process.argv
const releaseType = args[args.indexOf('--release-type') + 1] const releaseType = args[args.indexOf('--release-type') + 1]
...@@ -86,9 +88,9 @@ async function main() { ...@@ -86,9 +88,9 @@ async function main() {
console.log(`Invalid release type ${releaseType}, must be stable or canary`) console.log(`Invalid release type ${releaseType}, must be stable or canary`)
return return
} }
if (!isCanary && !['patch', 'minor', 'stable'].includes(semverType)) { if (!isCanary && !SEMVER_TYPES.includes(semverType)) {
console.log( console.log(
`Invalid semver type ${semverType}, must be one of ${semverType.join( `Invalid semver type ${semverType}, must be one of ${SEMVER_TYPES.join(
', ' ', '
)}` )}`
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment