Skip to content

Commit 2ddede2

Browse files
ishikawa-proclaude
andcommitted
fix: resolve Team ID mismatch crash on macOS
- Add forceCodeSigning to ensure consistent signatures - Re-sign entire app bundle after build to unify Team IDs - Add electron-rebuild step to properly rebuild native modules This fixes the 'different Team IDs' crash when launching the app. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3438447 commit 2ddede2

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

.github/workflows/build-and-release.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,30 @@ jobs:
3838
sudo apt-get update
3939
sudo apt-get install -y libnss3-dev libatk-bridge2.0-dev libdrm2 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libxss1 libasound2-dev
4040
41+
- name: Rebuild native dependencies
42+
run: npx electron-rebuild
43+
4144
- name: Build application
4245
run: npm run dist
4346
env:
4447
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4548

49+
- name: Fix code signing (macOS)
50+
if: matrix.os == 'macos-latest'
51+
run: |
52+
# Re-sign all apps with consistent ad-hoc signature
53+
for APP in dist/mac*/Git\ Diff\ Viewer.app; do
54+
if [ -d "$APP" ]; then
55+
echo "Re-signing $APP with ad-hoc signature..."
56+
# Remove all existing signatures
57+
find "$APP" -type f -perm +111 -exec codesign --remove-signature {} \; 2>/dev/null || true
58+
# Sign with ad-hoc
59+
codesign --force --deep --sign - "$APP"
60+
# Verify
61+
codesign --verify --deep --verbose "$APP"
62+
fi
63+
done
64+
4665
- name: Upload artifacts (macOS)
4766
if: matrix.os == 'macos-latest'
4867
uses: actions/upload-artifact@v4

electron-builder.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"npmRebuild": false,
1717
"buildDependenciesFromSource": true,
1818
"nodeGypRebuild": false,
19+
"forceCodeSigning": true,
1920
"mac": {
2021
"category": "public.app-category.developer-tools",
2122
"target": [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "diff-viewer",
3-
"version": "0.1.13",
3+
"version": "0.1.14",
44
"description": "A rich Git diff viewer with syntax highlighting",
55
"main": "build/electron/main.js",
66
"homepage": "./",

0 commit comments

Comments
 (0)