Skip to content

Commit 36d047e

Browse files
nesquenaclaude
andcommitted
fix: chmod +x on binary, use PlistBuddy for clean Info.plist
- Add chmod +x on the binary after copying to app bundle (fixes 'permission denied' when launching from DMG) - Replace heredoc Info.plist with PlistBuddy commands to avoid YAML indentation leaking into the plist XML (malformed plist prevents macOS from recognizing the app bundle) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 131a7de commit 36d047e

1 file changed

Lines changed: 13 additions & 29 deletions

File tree

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

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
mkdir -p "$APP_BUNDLE/Contents/MacOS"
2828
mkdir -p "$APP_BUNDLE/Contents/Resources"
2929
cp "$BUILD_DIR/$APP_NAME" "$APP_BUNDLE/Contents/MacOS/"
30+
chmod +x "$APP_BUNDLE/Contents/MacOS/$APP_NAME"
3031
3132
# Convert icon
3233
ICONSET="AppIcon.iconset"
@@ -44,35 +45,18 @@ jobs:
4445
iconutil -c icns "$ICONSET" -o "$APP_BUNDLE/Contents/Resources/AppIcon.icns"
4546
rm -rf "$ICONSET"
4647
47-
# Write Info.plist
48-
cat > "$APP_BUNDLE/Contents/Info.plist" << PLIST
49-
<?xml version="1.0" encoding="UTF-8"?>
50-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
51-
<plist version="1.0">
52-
<dict>
53-
<key>CFBundleName</key>
54-
<string>$DISPLAY_NAME</string>
55-
<key>CFBundleIdentifier</key>
56-
<string>ai.get-hermes.HermesAgent</string>
57-
<key>CFBundleVersion</key>
58-
<string>${GITHUB_REF_NAME#v}</string>
59-
<key>CFBundleShortVersionString</key>
60-
<string>${GITHUB_REF_NAME#v}</string>
61-
<key>CFBundleExecutable</key>
62-
<string>$APP_NAME</string>
63-
<key>CFBundlePackageType</key>
64-
<string>APPL</string>
65-
<key>CFBundleIconFile</key>
66-
<string>AppIcon</string>
67-
<key>LSMinimumSystemVersion</key>
68-
<string>12.0</string>
69-
<key>NSHighResolutionCapable</key>
70-
<true/>
71-
<key>LSUIElement</key>
72-
<false/>
73-
</dict>
74-
</plist>
75-
PLIST
48+
# Write Info.plist — use /usr/libexec/PlistBuddy for clean output
49+
VERSION="${GITHUB_REF_NAME#v}"
50+
/usr/libexec/PlistBuddy -c "Add :CFBundleName string 'Hermes Agent'" "$APP_BUNDLE/Contents/Info.plist"
51+
/usr/libexec/PlistBuddy -c "Add :CFBundleIdentifier string ai.get-hermes.HermesAgent" "$APP_BUNDLE/Contents/Info.plist"
52+
/usr/libexec/PlistBuddy -c "Add :CFBundleVersion string $VERSION" "$APP_BUNDLE/Contents/Info.plist"
53+
/usr/libexec/PlistBuddy -c "Add :CFBundleShortVersionString string $VERSION" "$APP_BUNDLE/Contents/Info.plist"
54+
/usr/libexec/PlistBuddy -c "Add :CFBundleExecutable string HermesAgent" "$APP_BUNDLE/Contents/Info.plist"
55+
/usr/libexec/PlistBuddy -c "Add :CFBundlePackageType string APPL" "$APP_BUNDLE/Contents/Info.plist"
56+
/usr/libexec/PlistBuddy -c "Add :CFBundleIconFile string AppIcon" "$APP_BUNDLE/Contents/Info.plist"
57+
/usr/libexec/PlistBuddy -c "Add :LSMinimumSystemVersion string 12.0" "$APP_BUNDLE/Contents/Info.plist"
58+
/usr/libexec/PlistBuddy -c "Add :NSHighResolutionCapable bool true" "$APP_BUNDLE/Contents/Info.plist"
59+
/usr/libexec/PlistBuddy -c "Add :LSUIElement bool false" "$APP_BUNDLE/Contents/Info.plist"
7660
7761
- name: Create DMG
7862
run: |

0 commit comments

Comments
 (0)