FreeDATA/gui/build/notarize_macos.js

25 lines
783 B
JavaScript
Raw Normal View History

2023-10-22 20:23:07 +00:00
const { notarize } = require('@electron/notarize');
async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
2023-10-23 07:17:44 +00:00
console.log("Notarization...")
2023-10-22 20:23:07 +00:00
if (electronPlatformName !== 'darwin') {
2023-10-23 07:17:44 +00:00
console.log("--> Platform:" + electronPlatformName + " detected: not a APPLE system. Skipping")
2023-10-22 20:23:07 +00:00
return;
}
2023-10-23 07:17:44 +00:00
console.log("--> Platform:" + electronPlatformName + " detected: Trying to notarize app.")
2023-10-22 20:23:07 +00:00
const appName = context.packager.appInfo.productFilename;
return await notarize({
2023-10-22 21:54:13 +00:00
tool: 'notarytool',
2023-10-22 20:23:07 +00:00
appBundleId: 'app.freedata',
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASSWORD,
2023-10-22 20:46:13 +00:00
teamId: process.env.APPLE_TEAM_ID
2023-10-22 20:23:07 +00:00
});
}
exports.default = notarizing;