skip uninstalling in CI

pull/2060/head
amrbashir 7 months ago
parent eb5c600eda
commit 021547be1c
No known key found for this signature in database
GPG Key ID: BBD7A47A2003FF33

@ -200,11 +200,13 @@ fn nsis() {
test_update(&app, update_bundle, signature, "nsis"); test_update(&app, update_bundle, signature, "nsis");
// cleanup the installed application // cleanup the installed application
let _ = Command::new(target_dir.join("debug/uninstall.exe")) if std::env::var("CI").map(|v| v == "true").unwrap_or_default() {
.arg("/S") let _ = Command::new(target_dir.join("debug/uninstall.exe"))
.status() .arg("/S")
.expect("failed to run nsis uninstaller"); .status()
std::thread::sleep(std::time::Duration::from_secs(5)); .expect("failed to run nsis uninstaller");
std::thread::sleep(std::time::Duration::from_secs(5));
}
} }
#[cfg(windows)] #[cfg(windows)]
@ -228,14 +230,16 @@ fn msi() {
test_update(&app, update_bundle, signature, "msi"); test_update(&app, update_bundle, signature, "msi");
// cleanup the installed application // cleanup the installed application
let uninstall = target_dir.join("debug/Uninstall app-updater.lnk"); if std::env::var("CI").map(|v| v == "true").unwrap_or_default() {
let _ = Command::new("cmd") let uninstall = target_dir.join("debug/Uninstall app-updater.lnk");
.arg("/c") let _ = Command::new("cmd")
.arg(&uninstall) .arg("/c")
.arg("/quiet") .arg(&uninstall)
.status() .arg("/quiet")
.expect("failed to run msi uninstaller"); .status()
std::thread::sleep(std::time::Duration::from_secs(5)); .expect("failed to run msi uninstaller");
std::thread::sleep(std::time::Duration::from_secs(5));
}
} }
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]

Loading…
Cancel
Save