From 18ae4abda305151083cca6252ad7e512b272dfd8 Mon Sep 17 00:00:00 2001 From: zzcwoshizz Date: Tue, 7 Feb 2023 00:05:24 +0800 Subject: [PATCH] fix(zcloak-ci-ghact-build): fix throw level error when no skip-beta arg --- packages/dev/scripts/zcloak-ci-ghact-build.mjs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/dev/scripts/zcloak-ci-ghact-build.mjs b/packages/dev/scripts/zcloak-ci-ghact-build.mjs index d6b892f..13506c2 100755 --- a/packages/dev/scripts/zcloak-ci-ghact-build.mjs +++ b/packages/dev/scripts/zcloak-ci-ghact-build.mjs @@ -136,14 +136,16 @@ async function verBump() { } } - if (level === 3) { - releaseType = 'major'; - } else if (level === 4) { - releaseType = 'minor'; - } else if (level === 5) { - releaseType = 'patch'; - } else { - throw new Error(`error level: ${level}`); + if (level >= 3) { + if (level === 3) { + releaseType = 'major'; + } else if (level === 4) { + releaseType = 'minor'; + } else if (level === 5) { + releaseType = 'patch'; + } else { + throw new Error(`error level: ${level}`); + } } execSync(`yarn zcloak-dev-version ${releaseType}`);