Skip to content

Commit

Permalink
chore: notarize the app after signing
Browse files Browse the repository at this point in the history
ref #9
ref #10
  • Loading branch information
Xiphe committed Apr 19, 2020
1 parent f94efaa commit 4b02aff
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 10 deletions.
21 changes: 12 additions & 9 deletions package-lock.json

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

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,14 @@
},
"directories": {
"buildResources": "assets"
}
},
"afterSign": "scripts/notarize.js"
},
"type": "module",
"dependencies": {
"classnames": "2.2.6",
"date-fns": "2.11.0",
"electron-notarize": "0.3.0",
"focus-visible": "5.1.0",
"fp-ts": "2.5.3",
"io-ts": "2.1.2",
Expand Down
25 changes: 25 additions & 0 deletions scripts/notarize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const { notarize } = require('electron-notarize');
const {
build: { appId },
} = require('../package.json');

exports.default = async function notarizing({
electronPlatformName,
appOutDir,
packager: {
appInfo: { productFilename },
},
}) {
if (electronPlatformName !== 'darwin') {
return;
}

console.log('notarizing...');
await notarize({
appBundleId: appId,
appPath: `${appOutDir}/${productFilename}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
});
console.log('OK');
};

0 comments on commit 4b02aff

Please sign in to comment.