forked from entrylabs/entry-offline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notarize.js
29 lines (25 loc) · 854 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
28
29
const { notarize } = require('electron-notarize');
module.exports = async function notarizing(notarizeOption) {
const { appBundleId, appPath, appleId, appleIdPassword } = notarizeOption;
const { NOTARIZE } = process.env;
// noinspection EqualityComparisonWithCoercionJS
if (NOTARIZE == 'false') {
console.log(' • NOTARIZE flag is false. will be skipped this process');
return;
}
if (!appleId || !appleIdPassword) {
console.log(' • APPLE_ID or APPLE_PASSWORD not found. will be skipped this process');
return;
}
console.log(' • Apple Notarizing...');
console.log(` • appBundleId: ${appBundleId}
appPath: ${appPath}
appleId: ${appleId}`,
);
return await notarize({
appBundleId,
appPath,
appleId,
appleIdPassword,
});
};