fix(bundler): Don't self-sign dmg (#12323)

This commit is contained in:
Fabian-Lars
2025-01-25 11:46:16 +01:00
committed by GitHub
parent 9a9d1205b0
commit 9dac2863af
2 changed files with 18 additions and 10 deletions

View File

@@ -0,0 +1,5 @@
---
tauri-bundler: 'patch:bug'
---
Skip signing the .dmg if self signing via `"signingIdentity": "-"` is used.

View File

@@ -194,16 +194,19 @@ pub fn bundle_project(settings: &Settings, bundles: &[Bundle]) -> crate::Result<
fs::rename(bundle_dir.join(dmg_name), dmg_path.clone())?;
// Sign DMG if needed
if let Some(keychain) = super::sign::keychain(settings.macos().signing_identity.as_deref())? {
super::sign::sign(
&keychain,
vec![super::sign::SignTarget {
path: dmg_path.clone(),
is_an_executable: false,
}],
settings,
)?;
// skipping self-signing DMGs https://github.com/tauri-apps/tauri/issues/12288
let identity = settings.macos().signing_identity.as_deref();
if identity != Some("-") {
if let Some(keychain) = super::sign::keychain(identity)? {
super::sign::sign(
&keychain,
vec![super::sign::SignTarget {
path: dmg_path.clone(),
is_an_executable: false,
}],
settings,
)?;
}
}
Ok(Bundled {