Skip to content

Commit 9dac286

Browse files
authored
fix(bundler): Don't self-sign dmg (#12323)
1 parent 9a9d120 commit 9dac286

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

.changes/dmg-no-selfsign.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
tauri-bundler: 'patch:bug'
3+
---
4+
5+
Skip signing the .dmg if self signing via `"signingIdentity": "-"` is used.

crates/tauri-bundler/src/bundle/macos/dmg/mod.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,16 +194,19 @@ pub fn bundle_project(settings: &Settings, bundles: &[Bundle]) -> crate::Result<
194194
fs::rename(bundle_dir.join(dmg_name), dmg_path.clone())?;
195195

196196
// Sign DMG if needed
197-
198-
if let Some(keychain) = super::sign::keychain(settings.macos().signing_identity.as_deref())? {
199-
super::sign::sign(
200-
&keychain,
201-
vec![super::sign::SignTarget {
202-
path: dmg_path.clone(),
203-
is_an_executable: false,
204-
}],
205-
settings,
206-
)?;
197+
// skipping self-signing DMGs https://github.com/tauri-apps/tauri/issues/12288
198+
let identity = settings.macos().signing_identity.as_deref();
199+
if identity != Some("-") {
200+
if let Some(keychain) = super::sign::keychain(identity)? {
201+
super::sign::sign(
202+
&keychain,
203+
vec![super::sign::SignTarget {
204+
path: dmg_path.clone(),
205+
is_an_executable: false,
206+
}],
207+
settings,
208+
)?;
209+
}
207210
}
208211

209212
Ok(Bundled {

0 commit comments

Comments
 (0)