From c3675e48fdcc88d87ee353f55c6f8f74fedf2b9e Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Tue, 5 Aug 2025 22:54:18 +0800 Subject: [PATCH] fix: update tauri.conf.json version to use full version information including build metadata --- scripts/release-version.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/release-version.mjs b/scripts/release-version.mjs index 471efc40..d1533f51 100644 --- a/scripts/release-version.mjs +++ b/scripts/release-version.mjs @@ -169,19 +169,21 @@ async function updateTauriConfigVersion(newVersion) { const versionWithoutV = newVersion.startsWith("v") ? newVersion.slice(1) : newVersion; - const baseVersion = getBaseVersion(versionWithoutV); console.log( "[INFO]: Current tauri.conf.json version is: ", tauriConfig.version, ); - tauriConfig.version = baseVersion; + + // 使用完整版本信息,包含build metadata + tauriConfig.version = versionWithoutV; + await fs.writeFile( tauriConfigPath, JSON.stringify(tauriConfig, null, 2), "utf8", ); - console.log(`[INFO]: tauri.conf.json version updated to: ${baseVersion}`); + console.log(`[INFO]: tauri.conf.json version updated to: ${versionWithoutV}`); } catch (error) { console.error("Error updating tauri.conf.json version:", error); throw error;