Skip to content

Commit

Permalink
add mac notarization steps
Browse files Browse the repository at this point in the history
Closes #29
  • Loading branch information
tom-james-watson committed Feb 21, 2021
1 parent b3d05e9 commit 67bd30c
Show file tree
Hide file tree
Showing 5 changed files with 11,598 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ node_modules
release
app/main/dist
app/renderer/dist

# dotenv
.env
10 changes: 10 additions & 0 deletions internals/build/entitlements.mac.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
18 changes: 18 additions & 0 deletions internals/scripts/Notarize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
require("dotenv").config();
const { notarize } = require("electron-notarize");

exports.default = async function notarizing(context) {
const { electronPlatformName } = context;
if (electronPlatformName !== "darwin") {
return;
}

const appName = context.packager.appInfo.productFilename;

return await notarize({
appBundleId: "com.tomjwatson.breaktimer",
appPath: `release/mac/BreakTimer.app`,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASS,
});
};
19 changes: 16 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "breaktimer",
"version": "0.8.1",
"version": "0.9.0",
"productName": "BreakTimer",
"description": "Manage periodic breaks",
"scripts": {
Expand Down Expand Up @@ -55,6 +55,15 @@
],
"asar": false,
"artifactName": "${productName}.${ext}",
"mac": {
"entitlements": "./internals/build/entitlements.mac.plist",
"entitlementsInherit": "./internals/build/entitlements.mac.plist",
"gatekeeperAssess": false,
"hardenedRuntime": true,
"target": [
"dmg"
]
},
"dmg": {
"contents": [
{
Expand All @@ -67,7 +76,8 @@
"type": "link",
"path": "/Applications"
}
]
],
"sign": false
},
"win": {
"target": [
Expand Down Expand Up @@ -100,7 +110,8 @@
"owner": "tom-james-watson",
"repo": "breaktimer-app",
"private": false
}
},
"afterSign": "internals/scripts/Notarize.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -152,11 +163,13 @@
"cross-spawn": "^6.0.5",
"css-loader": "^2.1.0",
"detect-port": "^1.3.0",
"dotenv": "^8.2.0",
"electron": "^10.1.5",
"electron-builder": "^22.7.0",
"electron-debug": "^3.1.0",
"electron-devtools-installer": "^3.1.1",
"electron-log": "^4.2.2",
"electron-notarize": "^1.0.0",
"electron-updater": "^4.3.1",
"enzyme": "^3.8.0",
"enzyme-adapter-react-16": "^1.7.1",
Expand Down
Loading

0 comments on commit 67bd30c

Please sign in to comment.