-
-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathnotarize.js
More file actions
25 lines (21 loc) · 636 Bytes
/
notarize.js
File metadata and controls
25 lines (21 loc) · 636 Bytes
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
require("dotenv").config();
const { notarize } = require("electron-notarize");
exports.default = async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;
if (
electronPlatformName !== "darwin" ||
!process.env.APPLEID ||
!process.env.APPLEIDPASS
) {
return;
}
const appName = context.packager.appInfo.productFilename;
console.log(" • notarizing");
return await notarize({
tool: "notarytool",
appPath: `${appOutDir}/${appName}.app`,
appleId: process.env.APPLEID,
appleIdPassword: process.env.APPLEIDPASS,
teamId: process.env.APPLE_TEAM_ID
});
};