Skip to content

Commit

Permalink
fix(zcloak-ci-ghact-build): fix throw level error when no skip-beta arg
Browse files Browse the repository at this point in the history
  • Loading branch information
zzcwoshizz committed Feb 6, 2023
1 parent 44e46bd commit 18ae4ab
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/dev/scripts/zcloak-ci-ghact-build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down

0 comments on commit 18ae4ab

Please sign in to comment.