-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathnotarize-existing.cjs
More file actions
31 lines (26 loc) · 884 Bytes
/
notarize-existing.cjs
File metadata and controls
31 lines (26 loc) · 884 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
26
27
28
29
30
31
const { notarize } = require('@electron/notarize');
const appleApiKeyId = process.env.APPLE_API_KEY;
const appleApiIssuer = process.env.APPLE_API_ISSUER;
const appleApiKeyPath = process.env.APPLE_API_KEY_PATH;
if (!appleApiKeyId || !appleApiIssuer || !appleApiKeyPath) {
console.error('Missing environment variables!');
console.error('Need: APPLE_API_KEY, APPLE_API_ISSUER, APPLE_API_KEY_PATH');
process.exit(1);
}
const appPath = './dist/mac-arm64/LedFx-CC.app';
console.log(`Notarizing ${appPath}...`);
console.log(`Using Apple API Key ID: ${appleApiKeyId}`);
notarize({
tool: 'notarytool',
appPath: appPath,
appleApiKeyId: appleApiKeyId,
appleApiIssuer: appleApiIssuer,
appleApiKey: appleApiKeyPath,
})
.then(() => {
console.log('✅ Notarization complete!');
})
.catch((error) => {
console.error('❌ Notarization failed:', error);
process.exit(1);
});