Skip to content

Commit

Permalink
fix(bundler): Don't self-sign dmg (#12323)
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianLars authored Jan 25, 2025
1 parent 9a9d120 commit 9dac286
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
5 changes: 5 additions & 0 deletions .changes/dmg-no-selfsign.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
tauri-bundler: 'patch:bug'
---

Skip signing the .dmg if self signing via `"signingIdentity": "-"` is used.
23 changes: 13 additions & 10 deletions crates/tauri-bundler/src/bundle/macos/dmg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9dac286

Please sign in to comment.