Skip to content

Commit 28b95f9

Browse files
committed
fix: disable hardened runtime for BrunoN macOS builds
BrunoN builds are unsigned (no Apple Developer account), so we need to: - Disable hardenedRuntime for BrunoN builds - Remove identity/entitlements configuration for BrunoN - Disable notarization (afterSign) for BrunoN builds This fixes the macOS artifact corruption issue where unsigned apps were being built with hardened runtime flags, which macOS treats as corrupted/invalid. Official Bruno builds continue to use proper code signing and notarization as before.
1 parent 05426d3 commit 28b95f9

File tree

1 file changed

+30
-20
lines changed

1 file changed

+30
-20
lines changed

packages/bruno-electron/electron-builder-config.js

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,33 @@ const version = process.env.BRUNON_GIT_TAG
1010
? process.env.BRUNON_GIT_TAG.replace(/^v/, '')
1111
: require('./package.json').version;
1212

13+
// macOS code signing configuration
14+
// BrunoN builds are unsigned (no Apple Developer account)
15+
// Bruno builds use proper code signing with notarization
16+
const macConfig = {
17+
artifactName: '${productName}_${buildVersion}_${arch}_${os}.${ext}',
18+
category: 'public.app-category.developer-tools',
19+
target: [
20+
{
21+
target: 'dmg',
22+
arch: ['x64', 'arm64']
23+
},
24+
{
25+
target: 'zip',
26+
arch: ['x64', 'arm64']
27+
}
28+
],
29+
icon: 'resources/icons/mac/icon.icns'
30+
};
31+
32+
// Only add code signing configuration for official Bruno builds
33+
if (!isBrunoNRelease) {
34+
macConfig.hardenedRuntime = true;
35+
macConfig.identity = 'Anoop MD (W7LPPWA48L)';
36+
macConfig.entitlements = 'resources/entitlements.mac.plist';
37+
macConfig.entitlementsInherit = 'resources/entitlements.mac.plist';
38+
}
39+
1340
const config = {
1441
appId: 'com.usebruno.app',
1542
productName: productName,
@@ -26,26 +53,9 @@ const config = {
2653
}
2754
],
2855
files: ['**/*'],
29-
afterSign: 'notarize.js',
30-
mac: {
31-
artifactName: '${productName}_${buildVersion}_${arch}_${os}.${ext}',
32-
category: 'public.app-category.developer-tools',
33-
target: [
34-
{
35-
target: 'dmg',
36-
arch: ['x64', 'arm64']
37-
},
38-
{
39-
target: 'zip',
40-
arch: ['x64', 'arm64']
41-
}
42-
],
43-
icon: 'resources/icons/mac/icon.icns',
44-
hardenedRuntime: true,
45-
identity: 'Anoop MD (W7LPPWA48L)',
46-
entitlements: 'resources/entitlements.mac.plist',
47-
entitlementsInherit: 'resources/entitlements.mac.plist'
48-
},
56+
// Only enable notarization for official Bruno builds
57+
afterSign: isBrunoNRelease ? undefined : 'notarize.js',
58+
mac: macConfig,
4959
linux: {
5060
artifactName: '${productName}_${buildVersion}_${arch}_linux.${ext}',
5161
icon: 'resources/icons/png',

0 commit comments

Comments
 (0)