File tree 4 files changed +60
-3
lines changed
4 files changed +60
-3
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * This script is used to build the electron app **with notarization**. It is used for the final build and release process.
3
+ */
4
+ require ( 'dotenv' ) . config ( ) ;
1
5
const build = require ( 'electron-builder' ) . build ;
2
6
3
7
const { publishOptions } = require ( './electron/constants' ) ;
Original file line number Diff line number Diff line change
1
+ /**
2
+ * This script is used to build the electron app **without** notarization.
3
+ *
4
+ * This is useful for testing the build process.
5
+ * 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.
6
+ */
7
+ require ( 'dotenv' ) . config ( ) ;
8
+ const build = require ( 'electron-builder' ) . build ;
9
+
10
+ const { publishOptions } = require ( './electron/constants' ) ;
11
+
12
+ const main = async ( ) => {
13
+ console . log ( 'Building...' ) ;
14
+
15
+ /** @type import {CliOptions} from "electron-builder" */
16
+ await build ( {
17
+ publish : 'onTag' ,
18
+ config : {
19
+ appId : 'xyz.valory.olas-operate-app' ,
20
+ artifactName : '${productName}-${version}-${platform}-${arch}.${ext}' ,
21
+ productName : 'Pearl' ,
22
+ files : [ 'electron/**/*' , 'package.json' ] ,
23
+ directories : {
24
+ output : 'dist' ,
25
+ } ,
26
+ extraResources : [
27
+ {
28
+ from : 'electron/bins' ,
29
+ to : 'bins' ,
30
+ filter : [ '**/*' ] ,
31
+ } ,
32
+ ] ,
33
+ mac : {
34
+ publish : null ,
35
+ target : [
36
+ {
37
+ target : 'default' ,
38
+ arch : [ 'arm64' ] ,
39
+ } ,
40
+ ] ,
41
+ category : 'public.app-category.utilities' ,
42
+ icon : 'electron/assets/icons/splash-robot-head-dock.png' ,
43
+ hardenedRuntime : true ,
44
+ gatekeeperAssess : false ,
45
+ entitlements : 'electron/entitlements.mac.plist' ,
46
+ entitlementsInherit : 'electron/entitlements.mac.plist' ,
47
+ } ,
48
+ } ,
49
+ } ) ;
50
+ } ;
51
+
52
+ main ( ) . then ( ( response ) => { console . log ( 'Build & Notarize complete' ) ; } ) . catch ( ( e ) => console . error ( e ) ) ;
Original file line number Diff line number Diff line change 1
1
const os = require ( 'os' ) ;
2
2
const path = require ( 'path' ) ;
3
+ require ( 'dotenv' ) . config ( ) ;
3
4
4
5
const PORT_RANGE = { startPort : 39152 , endPort : 65535 } ;
5
6
const ERROR_ADDRESS_IN_USE = 'EADDRINUSE' ;
@@ -10,8 +11,8 @@ const isMac = process.platform === 'darwin';
10
11
const isLinux = process . platform === 'linux' ;
11
12
12
13
// Environment specific constants
13
- const isProd = process . env . NODE_ENV === 'production ' ;
14
- const isDev = ! isProd ;
14
+ const isDev = process . env . NODE_ENV === 'development ' ;
15
+ const isProd = ! isDev ;
15
16
16
17
// Paths
17
18
const dotOperateDirectory = isProd
Original file line number Diff line number Diff line change 43
43
"productName" : " Pearl" ,
44
44
"description" : " An all-in-one application designed to streamline your entry into the world of autonomous agents and earning OLAS through staking." ,
45
45
"scripts" : {
46
- "build" : " rm -rf dist/ && electron-builder build" ,
46
+ "build" : " rm -rf dist/ && node build.tester.js " ,
47
47
"build:frontend" : " cd frontend && yarn build && rm -rf ../electron/.next && cp -r .next ../electron/.next && rm -rf ../electron/public && cp -r public ../electron/public" ,
48
48
"dev:backend" : " poetry run python operate/cli.py" ,
49
49
"dev:frontend" : " cd frontend && yarn dev" ,
You can’t perform that action at this time.
0 commit comments