Ver código fonte

fix(bundler): warning for self contained updaters (#10270)

* Fix warning for self contained updaters

* Add change file
Tony 1 ano atrás
pai
commit
d1df6be701
2 arquivos alterados com 14 adições e 1 exclusões
  1. 5 0
      .changes/fix-updater-warning.md
  2. 9 1
      tooling/bundler/src/bundle.rs

+ 5 - 0
.changes/fix-updater-warning.md

@@ -0,0 +1,5 @@
+---
+tauri-bundler: patch:bug
+---
+
+Fix bundler warns about no updater-enabled targets were built for self contained updaters like app image, nsis, msi

+ 9 - 1
tooling/bundler/src/bundle.rs

@@ -161,7 +161,15 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<Bundle>> {
         package_type: PackageType::Updater,
         bundle_paths: updater_paths,
       });
-    } else {
+    } else if updater.v1_compatible
+      || !package_types.iter().any(|package_type| {
+        // Self contained updater, no need to zip
+        matches!(
+          package_type,
+          PackageType::AppImage | PackageType::Nsis | PackageType::WindowsMsi
+        )
+      })
+    {
       log::warn!("The bundler was configured to create updater artifacts but no updater-enabled targets were built. Please enable one of these targets: app, appimage, msi, nsis");
     }
     if updater.v1_compatible {