mirror of
https://github.com/netzbegruenung/jitsi-meet-electron.git
synced 2024-05-04 09:43:42 +02:00
29 lines
824 B
JavaScript
29 lines
824 B
JavaScript
|
const { notarize } = require('electron-notarize');
|
||
|
const process = require('process');
|
||
|
const pkgJson = require('./package.json');
|
||
|
|
||
|
exports.default = async function notarizing(context) {
|
||
|
const { electronPlatformName, appOutDir } = context;
|
||
|
|
||
|
if (electronPlatformName !== 'darwin') {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
if (!(process.env.APPLE_ID && process.env.APPLE_ID_PASSWORD && process.env.TEAM_ID)) {
|
||
|
console.log('Skipping notarization');
|
||
|
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
const appName = context.packager.appInfo.productFilename;
|
||
|
|
||
|
return await notarize({
|
||
|
tool: 'notarytool',
|
||
|
appBundleId: pkgJson.build.appId,
|
||
|
appPath: `${appOutDir}/${appName}.app`,
|
||
|
appleId: process.env.APPLE_ID,
|
||
|
appleIdPassword: process.env.APPLE_ID_PASSWORD,
|
||
|
teamId: process.env.TEAM_ID
|
||
|
});
|
||
|
};
|