2021-11-23 12:56:46 +05:30
|
|
|
const { notarize } = require('electron-notarize');
|
2019-12-24 15:44:28 +05:30
|
|
|
|
2021-11-23 12:56:46 +05:30
|
|
|
exports.default = async (context) => {
|
2019-12-24 15:44:28 +05:30
|
|
|
const { electronPlatformName, appOutDir } = context;
|
2021-12-10 15:23:54 +05:30
|
|
|
if (
|
|
|
|
electronPlatformName !== 'darwin' ||
|
|
|
|
!parseInt(process.env.APPLE_NOTARIZE)
|
|
|
|
) {
|
2019-12-24 15:44:28 +05:30
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
const appName = context.packager.appInfo.productFilename;
|
|
|
|
|
|
|
|
return await notarize({
|
2020-01-02 23:06:00 +05:30
|
|
|
appBundleId: 'io.frappe.books',
|
2019-12-24 15:44:28 +05:30
|
|
|
appPath: `${appOutDir}/${appName}.app`,
|
|
|
|
appleId: process.env.APPLE_ID,
|
2021-11-23 12:56:46 +05:30
|
|
|
appleIdPassword: process.env.APPLE_APP_PASSWORD,
|
2021-12-06 16:36:26 +05:30
|
|
|
teamId: process.env.APPLE_TEAM_ID,
|
2019-12-24 15:44:28 +05:30
|
|
|
});
|
|
|
|
};
|