forked from stream-labs/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notarize.js
27 lines (21 loc) · 833 Bytes
/
notarize.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const { notarize } = require('electron-notarize');
const fs = require('fs');
exports.default = async function notarizing(context) {
if (process.env.SLOBS_NO_NOTARIZE) return;
if (process.platform !== 'darwin') return;
const appName = context.packager.appInfo.productFilename;
const appPath = `${context.appOutDir}/${appName}.app`;
if (!fs.existsSync(appPath)) {
throw new Error(`Cannot find application for notarization at: ${appPath}`);
}
console.log(`Notarizing app found at: ${appPath}`);
console.log('This can take several minutes.');
await notarize({
appPath,
appBundleId: 'com.streamlabs.slobs',
appleId: process.env['APPLE_ID'],
appleIdPassword: process.env['APPLE_APP_PASSWORD'],
ascProvider: process.env['APPLE_ASC_PROVIDER']
});
console.log('Notarization finished.');
};