Skip to content

fix(build): skip Tauri's internal bundle_dmg.sh; always use make-dmg.sh#66

Merged
oratis merged 1 commit into
mainfrom
fix/tauri-skip-internal-dmg
May 28, 2026
Merged

fix(build): skip Tauri's internal bundle_dmg.sh; always use make-dmg.sh#66
oratis merged 1 commit into
mainfrom
fix/tauri-skip-internal-dmg

Conversation

@oratis

@oratis oratis commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Drop dmg from tauri.conf.json bundle.targets (keep only app). Tauri's bundle_dmg.sh was failing intermittently when stale rw.*.dmg files were left in the output directory by a prior failed run.
  • Update scripts/sign-and-notarize.sh to always build the DMG ourselves via scripts/make-dmg.sh, no longer conditional on Tauri having produced one. This gives us:
    • Deterministic DMG output path (computed from tauri.conf.json version)
    • Pretty Finder layout (700×420 window, 128 px icons centered) baked into the read-write image via AppleScript before we convert to UDZO
    • Signing of the DMG containing the already-signed-and-stapled .app

Test plan

  • pnpm tauri build --target aarch64-apple-darwin produces only .app (no failed DMG step)
  • scripts/sign-and-notarize.sh signs + notarizes + staples .app
  • make-dmg.sh produces 4.2 MB DMG with persistent .DS_Store
  • Apple notarizes DMG (submission 9c72c43f-0fc3-40cc-9bd7-1101aab927e2, status Accepted)
  • spctl --assess --type open --context context:primary-signature → "accepted, source=Notarized Developer ID"

🤖 Generated with Claude Code

bundle_dmg.sh inside tauri-bundler is fragile when invoked twice
(leftover rw.*.dmg from prior runs breaks the second invocation, even
after cleanup). Since our sign-and-notarize.sh always rebuilds the DMG
via make-dmg.sh anyway (to embed the signed .app + apply pretty
layout), we don't need Tauri's DMG at all.

  · apps/desktop/src-tauri/tauri.conf.json — bundle.targets goes
    ["dmg", "app"] → ["app"]. Tauri now just produces .app.
  · scripts/sign-and-notarize.sh — DMG_PATH is now an expected output
    path (we extract version from tauri.conf.json) instead of being
    resolved from existing files. Step 7's `[ -f "$DMG_PATH" ]` check
    dropped — make-dmg.sh always builds it fresh.

This makes the pipeline idempotent: any number of consecutive runs of
scripts/sign-and-notarize.sh produce identical, signed, notarized DMGs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit 9910b82 into main May 28, 2026
1 of 3 checks passed
@oratis oratis deleted the fix/tauri-skip-internal-dmg branch May 28, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant