From d1df6be701fc1cd64fd227d68041a1096386d3b5 Mon Sep 17 00:00:00 2001 From: Tony <68118705+Legend-Master@users.noreply.github.com> Date: Mon, 15 Jul 2024 16:18:48 +0800 Subject: [PATCH] fix(bundler): warning for self contained updaters (#10270) * Fix warning for self contained updaters * Add change file --- .changes/fix-updater-warning.md | 5 +++++ tooling/bundler/src/bundle.rs | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .changes/fix-updater-warning.md diff --git a/.changes/fix-updater-warning.md b/.changes/fix-updater-warning.md new file mode 100644 index 000000000..129314d2a --- /dev/null +++ b/.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 diff --git a/tooling/bundler/src/bundle.rs b/tooling/bundler/src/bundle.rs index 3ca08386b..eb222295e 100644 --- a/tooling/bundler/src/bundle.rs +++ b/tooling/bundler/src/bundle.rs @@ -161,7 +161,15 @@ pub fn bundle_project(settings: &Settings) -> crate::Result> { 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 {