Skip to content

Commit

Permalink
fix: revert notarize
Browse files Browse the repository at this point in the history
  • Loading branch information
amilajack committed Jul 13, 2024
1 parent 640a472 commit 94cc0ba
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 12 deletions.
38 changes: 38 additions & 0 deletions .erb/scripts/notarize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
const { notarize } = require('@electron/notarize');
const { build } = require('../../package.json');

exports.default = async function notarizeMacos(context) {
const { electronPlatformName, appOutDir } = context;
if (electronPlatformName !== 'darwin') {
return;
}

if (process.env.CI !== 'true') {
console.warn('Skipping notarizing step. Packaging is not running in CI');
return;
}

if (
!(
'APPLE_ID' in process.env &&
'APPLE_ID_PASS' in process.env &&
'APPLE_TEAM_ID' in process.env
)
) {
console.warn(
'Skipping notarizing step. APPLE_ID, APPLE_ID_PASS, and APPLE_TEAM_ID env variables must be set',
);
return;
}

const appName = context.packager.appInfo.productFilename;

await notarize({
tool: 'notarytool',
appBundleId: build.appId,
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASS,
teamId: process.env.APPLE_TEAM_ID,
});
};
44 changes: 35 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
}
},
"dependencies": {
"@electron/notarize": "^2.3.2",
"electron-debug": "^3.2.0",
"electron-log": "^4.4.8",
"electron-updater": "^6.1.4",
Expand Down Expand Up @@ -179,9 +180,8 @@
"package.json"
],
"mac": {
"notarize": {
"appBundleId": "org.erb.ElectronReact"
},
"sign": ".erb/scripts/notarize.js",
"notarize": false,
"target": {
"target": "default",
"arch": [
Expand Down

0 comments on commit 94cc0ba

Please sign in to comment.