From 0bcba460b77aad33a22280d4544c65aa7f68e848 Mon Sep 17 00:00:00 2001 From: Jimmy Lai Date: Thu, 26 Oct 2023 08:58:37 -0700 Subject: [PATCH] fix publish script --- scripts/start-release.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/start-release.js b/scripts/start-release.js index 23e06fbde8072..42f8d4e9c11b2 100644 --- a/scripts/start-release.js +++ b/scripts/start-release.js @@ -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] @@ -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( ', ' )}` )