FreeDATA/gui/build/notarize_macos.js

25 lines
783 B
JavaScript
Raw Normal View History

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