Skip to content

Commit f9a3416

Browse files
authored
fix: macos notarization (#114)
* fix: macos notarization * test * test 2
1 parent c59a566 commit f9a3416

File tree

4 files changed

+29
-15
lines changed

4 files changed

+29
-15
lines changed

packages/desktop/electron-builder-config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const baseConfig = () => ({
1111
afterSign: async () => {
1212
// eslint-disable-next-line no-useless-catch
1313
try {
14-
await notarize(getAppId(process.env.STAGE || 'alpha'), getAppName(process.env.STAGE || 'alpha'))
14+
await notarize(getAppName(process.env.STAGE || 'alpha'))
1515
} catch (error) {
1616
// This catch is necessary or the promise rejection is swallowed
1717
throw error

packages/desktop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"css-loader": "^5.0.1",
5151
"electron": "12.2.3",
5252
"electron-builder": "^22.9.1",
53-
"electron-notarize": "^1.0.0",
53+
"@electron/notarize": "2.1.0",
5454
"lodash.merge": "^4.6.2",
5555
"mini-css-extract-plugin": "^1.3.5",
5656
"node-loader": "^1.0.2",

packages/desktop/scripts/notarize.macos.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
const { notarize } = require('electron-notarize')
1+
const { notarize } = require('@electron/notarize')
22
const path = require('path')
33

44
/**
55
*
66
* @param {string} appName
77
* @returns void
88
*/
9-
module.exports = async (appBundleId, appName) => {
10-
if (process.platform !== 'darwin' || process.env.MACOS_SKIP_NOTARIZATION) {
9+
module.exports = async (appName) => {
10+
if (process.platform !== 'darwin' || process.env.MACOS_SKIP_NOTARIZATION === 'true') {
1111
return true
1212
}
1313

@@ -25,10 +25,10 @@ module.exports = async (appBundleId, appName) => {
2525
}
2626

2727
await notarize({
28-
appBundleId: appBundleId,
28+
tool: 'notarytool',
2929
appPath: path.resolve(__dirname, `../out/mac/${appName}.app`),
3030
appleId: APPLE_ID,
3131
appleIdPassword: APPLE_ID_PASSWORD,
32-
ascProvider: 'UG77RJKZHH',
32+
teamId: 'UG77RJKZHH',
3333
})
3434
}

yarn.lock

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,15 @@
11451145
global-agent "^2.0.2"
11461146
global-tunnel-ng "^2.7.1"
11471147

1148+
"@electron/[email protected]":
1149+
version "2.1.0"
1150+
resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.1.0.tgz#76aaec10c8687225e8d0a427cc9df67611c46ff3"
1151+
integrity sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==
1152+
dependencies:
1153+
debug "^4.1.1"
1154+
fs-extra "^9.0.1"
1155+
promise-retry "^2.0.1"
1156+
11481157
"@eslint/eslintrc@^0.4.3":
11491158
version "0.4.3"
11501159
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
@@ -4112,14 +4121,6 @@ electron-log@^4.3.1:
41124121
resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-4.3.1.tgz#1405fef9d4e6964a5fdb8790a69163aa237ffe91"
41134122
integrity sha512-S/0CMjYjgyWUsZ3d27VvErPaI5W4oILp4jfeCuN4DhDqrJW6jKRUD2PxFfTdeZEIjM7+fttGg7A61rPcAcZC1w==
41144123

4115-
electron-notarize@^1.0.0:
4116-
version "1.0.0"
4117-
resolved "https://registry.yarnpkg.com/electron-notarize/-/electron-notarize-1.0.0.tgz#bc925b1ccc3f79e58e029e8c4706572b01a9fd8f"
4118-
integrity sha512-dsib1IAquMn0onCrNMJ6gtEIZn/azG8hZMCYOuZIMVMUeRMgBYHK1s5TK9P8xAcrAjh/2aN5WYHzgVSWX314og==
4119-
dependencies:
4120-
debug "^4.1.1"
4121-
fs-extra "^9.0.1"
4122-
41234124
41244125
version "22.9.1"
41254126
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-22.9.1.tgz#7cc76ac4cc53efd29ee31c1e5facb9724329068e"
@@ -4237,6 +4238,11 @@ envinfo@^7.7.3:
42374238
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.4.tgz#c6311cdd38a0e86808c1c9343f667e4267c4a320"
42384239
integrity sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ==
42394240

4241+
err-code@^2.0.2:
4242+
version "2.0.3"
4243+
resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9"
4244+
integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==
4245+
42404246
errno@^0.1.3:
42414247
version "0.1.8"
42424248
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f"
@@ -8316,6 +8322,14 @@ progress@^2.0.0, progress@^2.0.3:
83168322
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
83178323
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
83188324

8325+
promise-retry@^2.0.1:
8326+
version "2.0.1"
8327+
resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22"
8328+
integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==
8329+
dependencies:
8330+
err-code "^2.0.2"
8331+
retry "^0.12.0"
8332+
83198333
prompts@^2.0.1:
83208334
version "2.4.1"
83218335
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.1.tgz#befd3b1195ba052f9fd2fde8a486c4e82ee77f61"

0 commit comments

Comments
 (0)