From d1a4975b4f7a471e202621545709490e68e5d54e Mon Sep 17 00:00:00 2001 From: everpcpc Date: Tue, 14 Jan 2025 16:48:25 +0800 Subject: [PATCH] chore(ci): fix gen next patch release (#17281) --- .github/scripts/bump_version.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/scripts/bump_version.js b/.github/scripts/bump_version.js index 415eea0808ff3..a77b8817b92c7 100644 --- a/.github/scripts/bump_version.js +++ b/.github/scripts/bump_version.js @@ -103,13 +103,13 @@ module.exports = async ({ github, context, core }) => { const patch = stable[3]; return `v${major}.${minor}.${patch}-p1`; } - const patch = RE_TAG_PATCH.exec(previous); - if (patch) { - const major = patch[1]; - const minor = patch[2]; - const patch = patch[3]; - const pv = parseInt(patch[4]); - return `v${major}.${minor}.${patch}-p${pv + 1}`; + const version = RE_TAG_PATCH.exec(previous); + if (version) { + const major = version[1]; + const minor = version[2]; + const patch = version[3]; + const pv = parseInt(version[4]) + 1; + return `v${major}.${minor}.${patch}-p${pv}`; } }