From 18808004f449395858c3100cc6ebcacd00644673 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Tue, 5 Aug 2025 20:02:47 +0800 Subject: [PATCH] fix: update Cargo.toml version handling to use the provided version directly --- scripts/release-version.mjs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/release-version.mjs b/scripts/release-version.mjs index 6e9106801..471efc40e 100644 --- a/scripts/release-version.mjs +++ b/scripts/release-version.mjs @@ -137,20 +137,19 @@ async function updateCargoVersion(newVersion) { const versionWithoutV = newVersion.startsWith("v") ? newVersion.slice(1) : newVersion; - const baseVersion = getBaseVersion(versionWithoutV); const updatedLines = lines.map((line) => { if (line.trim().startsWith("version =")) { return line.replace( /version\s*=\s*"[^"]+"/, - `version = "${baseVersion}"`, + `version = "${versionWithoutV}"`, ); } return line; }); await fs.writeFile(cargoTomlPath, updatedLines.join("\n"), "utf8"); - console.log(`[INFO]: Cargo.toml version updated to: ${baseVersion}`); + console.log(`[INFO]: Cargo.toml version updated to: ${versionWithoutV}`); } catch (error) { console.error("Error updating Cargo.toml version:", error); throw error;