Skip to content

Commit

Permalink
restore custom notarize script
Browse files Browse the repository at this point in the history
  • Loading branch information
imolorhe committed Sep 24, 2023
1 parent 71845a2 commit 5d02e88
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/altair-electron/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ files:
- '!**/*.ts'
- '!**/*.ts.map'
- '!**/*.js.map'
afterSign: electron-builder-notarize
afterSign: scripts/notarize.js
mac:
artifactName: ${name}_${version}_${arch}_${os}.${ext}
category: public.app-category.developer-tools
Expand Down
22 changes: 22 additions & 0 deletions packages/altair-electron/scripts/notarize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
require('dotenv').config();
const { notarize } = require('@electron/notarize');
const path = require('path');

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

const appName = context.packager.appInfo.productFilename;

console.log('Notarizing application');
await notarize({
tool: 'notarytool',
// appBundleId: 'com.xkoji.altair',
appPath: path.resolve(appOutDir, `${appName}.app`),
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASSWORD,
teamId: process.env.APPLE_TEAM_ID,
}).then(res => console.log('Notarization completed!') || res);
};

0 comments on commit 5d02e88

Please sign in to comment.