Skip to content

Commit b8338c0

Browse files
committed
chore: adding configuration to notarize Mac application
1 parent b7666ff commit b8338c0

File tree

5 files changed

+45
-0
lines changed

5 files changed

+45
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ advancedrestclient.pfx
3434
arc-mac-certs.p12
3535
certs.tar
3636
web_modules
37+
.env

build/entitlements.mac.plist

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
6+
<true/>
7+
</dict>
8+
</plist>

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@
6262
"chai": "^4.2.0",
6363
"cors": "^2.8.5",
6464
"cross-env": "^6.0.3",
65+
"dotenv": "^8.2.0",
6566
"electron": "^8.0.1",
6667
"electron-builder": "^22.2.0",
6768
"electron-mocha": "^8.2.1",
69+
"electron-notarize": "^0.2.1",
6870
"electron-windows-store": "^2.1.0",
6971
"eslint-config-google": "^0.14.0",
7072
"esm": "^3.2.25",
@@ -116,6 +118,7 @@
116118
"detectUpdateChannel": true,
117119
"npmRebuild": true,
118120
"buildDependenciesFromSource": false,
121+
"afterSign": "tasks/notarize.js",
119122
"files": [
120123
"app.html",
121124
"app.js",
@@ -132,6 +135,10 @@
132135
"mac": {
133136
"category": "public.app-category.developer-tools",
134137
"icon": "build/icon.icns",
138+
"hardenedRuntime": true,
139+
"gatekeeperAssess": false,
140+
"entitlements": "build/entitlements.mac.plist",
141+
"entitlementsInherit": "build/entitlements.mac.plist",
135142
"target": [
136143
{
137144
"target": "dmg",
@@ -148,6 +155,7 @@
148155
]
149156
},
150157
"dmg": {
158+
"sign": false,
151159
"contents": [
152160
{
153161
"x": 110,

tasks/notarize.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
require('dotenv').config();
2+
const { notarize } = require('electron-notarize');
3+
4+
exports.default = async function notarizing(context) {
5+
const { electronPlatformName, appOutDir } = context;
6+
if (electronPlatformName !== 'darwin') {
7+
return;
8+
}
9+
10+
const appName = context.packager.appInfo.productFilename;
11+
12+
return await notarize({
13+
appBundleId: 'com.mulesoft.arc',
14+
appPath: `${appOutDir}/${appName}.app`,
15+
appleId: process.env.APPLEID,
16+
appleIdPassword: process.env.APPLEIDPASS,
17+
});
18+
};

0 commit comments

Comments
 (0)