Skip to content

Commit 8c8ff84

Browse files
beautyfreeclaude
andauthored
Disambiguate codesign identity in repack-dmg.sh (#7)
The v0.2.0 third-attempt run (24573078620) got all the way through macOS signing + notarization + DMG creation, then died re-signing the DMG wrapper inside create-dmg: ***: ambiguous (matches "iPhone Distribution: ***" and "Developer ID Application: ***" in /Users/runner/work/_temp/skiller-build.keychain-db) The GitHub Actions macOS runner keychain happens to also have an "iPhone Distribution" cert, and the bare CSC_NAME value (which is the post-prefix identity name only) matches both. electron-builder itself filters by identity *type* internally so it didn't care; /usr/bin/codesign has no such filter. Fix: prepend `Developer ID Application: ` back when calling create-dmg's `--codesign`. Strip first so the operation is idempotent whether CSC_NAME is stored in bare form (new convention) or with prefix (legacy local .env). Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1d6ef7c commit 8c8ff84

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/repack-dmg.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,14 @@ trap 'rm -rf "$STAGING"' EXIT
5252

5353
CODESIGN_ARGS=()
5454
if [[ -n "${CSC_NAME:-}" ]]; then
55-
CODESIGN_ARGS=(--codesign "$CSC_NAME")
55+
# electron-builder 26+ wants CSC_NAME without the "Developer ID Application: "
56+
# prefix (it matches the cert type itself). /usr/bin/codesign has no such
57+
# filter — if the keychain has multiple identities (e.g. iPhone Distribution
58+
# + Developer ID Application), a bare name like "Your Name (TEAMID)" is
59+
# ambiguous. Prepend the prefix back here. Idempotent: strip first in case
60+
# CSC_NAME already has the full form (local dev habit).
61+
IDENTITY="${CSC_NAME#Developer ID Application: }"
62+
CODESIGN_ARGS=(--codesign "Developer ID Application: $IDENTITY")
5663
fi
5764

5865
echo "Repackaging DMG with styled layout…"

0 commit comments

Comments
 (0)