-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.tester.js
56 lines (52 loc) · 1.54 KB
/
build.tester.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* This script is used to build the electron app **without** notarization.
*
* This is useful for testing the build process.
* It will not notarize the app, so it will not be able to be run on someone else's Mac without disabling Gatekeeper on their machine.
*/
require('dotenv').config();
const build = require('electron-builder').build;
const { publishOptions } = require('./electron/constants');
const main = async () => {
console.log('Building...');
/** @type import {CliOptions} from "electron-builder" */
await build({
publish: 'onTag',
config: {
appId: 'xyz.valory.olas-operate-app',
artifactName: '${productName}-${version}-${platform}-${arch}.${ext}',
productName: 'Pearl',
files: ['electron/**/*', 'package.json'],
directories: {
output: 'dist',
},
extraResources: [
{
from: 'electron/bins',
to: 'bins',
filter: ['**/*'],
},
],
mac: {
publish: null,
target: [
{
target: 'default',
arch: ['arm64'],
},
],
category: 'public.app-category.utilities',
icon: 'electron/assets/icons/splash-robot-head-dock.png',
hardenedRuntime: true,
gatekeeperAssess: false,
entitlements: 'electron/entitlements.mac.plist',
entitlementsInherit: 'electron/entitlements.mac.plist',
},
},
});
};
main().then(() => {
console.log('Build & Notarize complete');
}).catch(() => {
throw new Error('Failed to build and notarize.');
});