diff --git a/apps/gpgui-helper/src-tauri/src/updater.rs b/apps/gpgui-helper/src-tauri/src/updater.rs index 449a048..ec479a5 100644 --- a/apps/gpgui-helper/src-tauri/src/updater.rs +++ b/apps/gpgui-helper/src-tauri/src/updater.rs @@ -80,14 +80,19 @@ impl GuiUpdater { pub async fn update(&self) { info!("Update GUI, version: {}", self.version); + #[cfg(debug_assertions)] + let release_tag = "latest"; + #[cfg(not(debug_assertions))] + let release_tag = format!("v{}", self.version); + #[cfg(target_arch = "x86_64")] let arch = "x86_64"; #[cfg(target_arch = "aarch64")] let arch = "aarch64"; let file_url = format!( - "https://github.com/yuezk/GlobalProtect-openconnect/releases/download/v{}/gpgui_{}_{}.bin.tar.xz", - self.version, self.version, arch + "https://github.com/yuezk/GlobalProtect-openconnect/releases/download/{}/gpgui_{}_{}.bin.tar.xz", + release_tag, self.version, arch ); let checksum_url = format!("{}.sha256", file_url);