Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: macos notarization #114

Merged
merged 3 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/desktop/electron-builder-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const baseConfig = () => ({
afterSign: async () => {
// eslint-disable-next-line no-useless-catch
try {
await notarize(getAppId(process.env.STAGE || 'alpha'), getAppName(process.env.STAGE || 'alpha'))
await notarize(getAppName(process.env.STAGE || 'alpha'))
} catch (error) {
// This catch is necessary or the promise rejection is swallowed
throw error
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"css-loader": "^5.0.1",
"electron": "12.2.3",
"electron-builder": "^22.9.1",
"electron-notarize": "^1.0.0",
"@electron/notarize": "2.1.0",
"lodash.merge": "^4.6.2",
"mini-css-extract-plugin": "^1.3.5",
"node-loader": "^1.0.2",
Expand Down
10 changes: 5 additions & 5 deletions packages/desktop/scripts/notarize.macos.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const { notarize } = require('electron-notarize')
const { notarize } = require('@electron/notarize')
const path = require('path')

/**
*
* @param {string} appName
* @returns void
*/
module.exports = async (appBundleId, appName) => {
if (process.platform !== 'darwin' || process.env.MACOS_SKIP_NOTARIZATION) {
module.exports = async (appName) => {
if (process.platform !== 'darwin' || process.env.MACOS_SKIP_NOTARIZATION === 'true') {
return true
}

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

await notarize({
appBundleId: appBundleId,
tool: 'notarytool',
appPath: path.resolve(__dirname, `../out/mac/${appName}.app`),
appleId: APPLE_ID,
appleIdPassword: APPLE_ID_PASSWORD,
ascProvider: 'UG77RJKZHH',
teamId: 'UG77RJKZHH',
})
}
30 changes: 22 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,15 @@
global-agent "^2.0.2"
global-tunnel-ng "^2.7.1"

"@electron/[email protected]":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.1.0.tgz#76aaec10c8687225e8d0a427cc9df67611c46ff3"
integrity sha512-Q02xem1D0sg4v437xHgmBLxI2iz/fc0D4K7fiVWHa/AnW8o7D751xyKNXgziA6HrTOme9ul1JfWN5ark8WH1xA==
dependencies:
debug "^4.1.1"
fs-extra "^9.0.1"
promise-retry "^2.0.1"

"@eslint/eslintrc@^0.4.3":
version "0.4.3"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
Expand Down Expand Up @@ -4112,14 +4121,6 @@ electron-log@^4.3.1:
resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-4.3.1.tgz#1405fef9d4e6964a5fdb8790a69163aa237ffe91"
integrity sha512-S/0CMjYjgyWUsZ3d27VvErPaI5W4oILp4jfeCuN4DhDqrJW6jKRUD2PxFfTdeZEIjM7+fttGg7A61rPcAcZC1w==

electron-notarize@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/electron-notarize/-/electron-notarize-1.0.0.tgz#bc925b1ccc3f79e58e029e8c4706572b01a9fd8f"
integrity sha512-dsib1IAquMn0onCrNMJ6gtEIZn/azG8hZMCYOuZIMVMUeRMgBYHK1s5TK9P8xAcrAjh/2aN5WYHzgVSWX314og==
dependencies:
debug "^4.1.1"
fs-extra "^9.0.1"

[email protected]:
version "22.9.1"
resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-22.9.1.tgz#7cc76ac4cc53efd29ee31c1e5facb9724329068e"
Expand Down Expand Up @@ -4237,6 +4238,11 @@ envinfo@^7.7.3:
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.7.4.tgz#c6311cdd38a0e86808c1c9343f667e4267c4a320"
integrity sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ==

err-code@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9"
integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA==

errno@^0.1.3:
version "0.1.8"
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f"
Expand Down Expand Up @@ -8316,6 +8322,14 @@ progress@^2.0.0, progress@^2.0.3:
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==

promise-retry@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22"
integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g==
dependencies:
err-code "^2.0.2"
retry "^0.12.0"

prompts@^2.0.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/prompts/-/prompts-2.4.1.tgz#befd3b1195ba052f9fd2fde8a486c4e82ee77f61"
Expand Down
Loading