|
|
|
@ -211,8 +211,14 @@ fn update_app() {
|
|
|
|
|
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
|
|
|
|
|
build_app(&manifest_dir, &config, true, Default::default());
|
|
|
|
|
build_app(&manifest_dir, &config, true, bundle_target);
|
|
|
|
|
|
|
|
|
|
let updater_zip_ext = if v1_compatible {
|
|
|
|
|
if cfg!(windows) {
|
|
|
|
@ -257,7 +263,8 @@ fn update_app() {
|
|
|
|
|
"target/debug/{}",
|
|
|
|
|
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();
|
|
|
|
|
|
|
|
|
@ -323,8 +330,7 @@ fn update_app() {
|
|
|
|
|
// Set appropriate permissions and install package if needed
|
|
|
|
|
#[cfg(target_os = "linux")]
|
|
|
|
|
{
|
|
|
|
|
let paths = bundle_paths(&root_dir, "0.1.0");
|
|
|
|
|
let bundle_path = &paths.first().unwrap().1;
|
|
|
|
|
let bundle_path = &out_bundle_path;
|
|
|
|
|
|
|
|
|
|
if bundle_target == BundleTarget::AppImage {
|
|
|
|
|
std::process::Command::new("sudo")
|
|
|
|
@ -413,6 +419,7 @@ fn update_app() {
|
|
|
|
|
server.unblock();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Always run cleanup
|
|
|
|
|