mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-08-17 18:25:42 +02:00
32 lines
944 B
JavaScript
32 lines
944 B
JavaScript
const { notarize } = require('@electron/notarize');
|
|
|
|
exports.default = async function notarizing(context) {
|
|
const { electronPlatformName, appOutDir } = context;
|
|
if (electronPlatformName !== 'darwin') return;
|
|
|
|
if (process.env.CSC_IDENTITY_AUTO_DISCOVERY === 'false') {
|
|
console.log('Skipping notarization (CSC_IDENTITY_AUTO_DISCOVERY=false)');
|
|
return;
|
|
}
|
|
|
|
if (!process.env.APPLE_ID || !process.env.APPLE_TEAM_ID) {
|
|
console.log('Skipping notarization (APPLE_ID or APPLE_TEAM_ID not set)');
|
|
return;
|
|
}
|
|
|
|
const appName = context.packager.appInfo.productFilename;
|
|
const appPath = `${appOutDir}/${appName}.app`;
|
|
|
|
console.log(`Notarizing ${appPath}...`);
|
|
|
|
await notarize({
|
|
appBundleId: 'com.clusterlabs.openswarm',
|
|
appPath,
|
|
appleId: process.env.APPLE_ID,
|
|
appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD,
|
|
teamId: process.env.APPLE_TEAM_ID,
|
|
});
|
|
|
|
console.log('Notarization complete.');
|
|
};
|