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

* Fix warning for self contained updaters

* Add change file
This commit is contained in:
Tony 2024-07-15 16:18:48 +08:00 committed by GitHub
parent 506f1dd873
commit d1df6be701
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 1 deletions

View File

@ -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

View File

@ -161,7 +161,15 @@ pub fn bundle_project(settings: &Settings) -> crate::Result<Vec<Bundle>> {
package_type: PackageType::Updater, package_type: PackageType::Updater,
bundle_paths: updater_paths, 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"); 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 { if updater.v1_compatible {