diff --git a/build/entitlements.mac.inherit.plist b/build/entitlements.mac.inherit.plist deleted file mode 100644 index 38c887b21..000000000 --- a/build/entitlements.mac.inherit.plist +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.security.cs.allow-jit - - com.apple.security.cs.allow-unsigned-executable-memory - - com.apple.security.cs.allow-dyld-environment-variables - - - diff --git a/notarize.js b/notarize.js deleted file mode 100644 index 9d951f07b..000000000 --- a/notarize.js +++ /dev/null @@ -1,32 +0,0 @@ -// See: https://medium.com/@TwitterArchiveEraser/notarize-electron-apps-7a5f988406db - -'use strict'; -const path = require('path'); -const electronNotarize = require('electron-notarize'); - -module.exports = async params => { - if (process.platform !== 'darwin') { - return; - } - - // Only notarize the app on the master branch - if (process.env.CIRCLE_BRANCH !== 'master') { - return; - } - - const packageJson = require('./package.json'); - const {appId} = packageJson.build; - - const appPath = path.join(params.appOutDir, `${params.packager.appInfo.productFilename}.app`); - - console.log(`Notarizing ${appId} found at ${appPath}`); - - await electronNotarize.notarize({ - appBundleId: appId, - appPath, - appleId: process.env.APPLE_ID, - appleIdPassword: process.env.APPLE_ID_PASSWORD - }); - - console.log(`Done notarizing ${appId}`); -}; diff --git a/package.json b/package.json index 8a6ed52dc..18fbd0426 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ "babel-eslint": "^10.0.3", "electron": "6.0.9", "electron-builder": "^21.2.0", + "electron-builder-notarize": "^1.0.4", "eslint-config-xo-react": "^0.20.0", "eslint-plugin-react": "^7.14.3", "eslint-plugin-react-hooks": "^2.0.1", @@ -118,7 +119,7 @@ }, "build": { "appId": "com.wulkano.kap", - "afterSign": "./notarize.js", + "afterSign": "electron-builder-notarize", "files": [ "**/*", "!renderer", @@ -130,7 +131,7 @@ "minimumSystemVersion": "10.12.0", "darkModeSupport": true, "hardenedRuntime": true, - "entitlements": "./build/entitlements.mac.inherit.plist", + "entitlements": "./node_modules/electron-builder-notarize/entitlements.mac.inherit.plist", "extendInfo": { "NSMicrophoneUsageDescription": "Kap needs access to the microphone to be able to record audio for screen recordings.", "NSUserNotificationAlertStyle": "alert", diff --git a/yarn.lock b/yarn.lock index 748e433e0..eb4e37644 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2726,6 +2726,13 @@ electron-better-ipc@^0.5.0: resolved "https://registry.yarnpkg.com/electron-better-ipc/-/electron-better-ipc-0.5.0.tgz#0a97776f1bb4640da46c006ca94de55052a9c4b5" integrity sha512-u67I8YI084macI8iAB64VTDLwkvVDQnZ5ang/GRPBfeqjZvXlsBqrzIJSKzi88ZDfgfSXk9U1YGpW4qPEGXK9Q== +electron-builder-notarize@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/electron-builder-notarize/-/electron-builder-notarize-1.0.4.tgz#5c81029306bcef6f000d6a1f3749d0eaac8be72b" + integrity sha512-DxQ3ntdnpgiKE/Iz3r50++25tuXBHmBq3qSX7uP4i4UA2uk++fgXGxRBC8ZMBNnFtSWvB+19mLa7wTNFkLE9sw== + dependencies: + electron-notarize "^0.2.0" + electron-builder@^21.2.0: version "21.2.0" resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-21.2.0.tgz#b68ec4def713fc0b8602654ce842f972432f50c5"