Now runs both appimage and deb tests

pull/1991/head
jLynx 9 months ago
parent 7346ade132
commit 5a95db813b

@ -211,8 +211,14 @@ fn update_app() {
Updater::String(V1Compatible::V1Compatible) Updater::String(V1Compatible::V1Compatible)
); );
#[cfg(target_os = "linux")]
let bundle_targets = vec![BundleTarget::AppImage, BundleTarget::Deb];
#[cfg(not(target_os = "linux"))]
let bundle_targets = vec![BundleTarget::default()];
for bundle_target in bundle_targets {
// bundle app update // bundle app update
build_app(&manifest_dir, &config, true, Default::default()); build_app(&manifest_dir, &config, true, bundle_target);
let updater_zip_ext = if v1_compatible { let updater_zip_ext = if v1_compatible {
if cfg!(windows) { if cfg!(windows) {
@ -257,7 +263,8 @@ fn update_app() {
"target/debug/{}", "target/debug/{}",
out_updater_path.file_name().unwrap().to_str().unwrap() out_updater_path.file_name().unwrap().to_str().unwrap()
)); ));
std::fs::rename(&out_updater_path, &updater_path).expect("failed to rename bundle"); std::fs::rename(&out_updater_path, &updater_path)
.expect("failed to rename bundle");
let target = target.clone(); let target = target.clone();
@ -323,8 +330,7 @@ fn update_app() {
// Set appropriate permissions and install package if needed // Set appropriate permissions and install package if needed
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
{ {
let paths = bundle_paths(&root_dir, "0.1.0"); let bundle_path = &out_bundle_path;
let bundle_path = &paths.first().unwrap().1;
if bundle_target == BundleTarget::AppImage { if bundle_target == BundleTarget::AppImage {
std::process::Command::new("sudo") std::process::Command::new("sudo")
@ -413,6 +419,7 @@ fn update_app() {
server.unblock(); server.unblock();
} }
} }
}
}); });
// Always run cleanup // Always run cleanup

Loading…
Cancel
Save