forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
/
electronBuilder.config.js
77 lines (70 loc) · 1.94 KB
/
electronBuilder.config.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
const {version} = require('../package.json');
const pullRequestNumber = process.env.PULL_REQUEST_NUMBER;
const s3Bucket = {
production: 'expensify-cash',
staging: 'staging-expensify-cash',
adhoc: 'ad-hoc-expensify-cash',
};
const s3Path = {
production: '/',
staging: '/',
adhoc: process.env.PULL_REQUEST_NUMBER ? `/desktop/${pullRequestNumber}/` : '/',
};
const macIcon = {
production: './desktop/icon.png',
staging: './desktop/icon-stg.png',
adhoc: './desktop/icon-adhoc.png',
};
const isCorrectElectronEnv = ['production', 'staging', 'adhoc'].includes(process.env.ELECTRON_ENV);
if (!isCorrectElectronEnv) {
throw new Error('Invalid ELECTRON_ENV!');
}
/**
* The configuration for the debug, production and staging Electron builds.
*/
module.exports = {
appId: 'com.expensifyreactnative.chat',
productName: 'New Expensify',
extraMetadata: {
version,
},
mac: {
category: 'public.app-category.finance',
icon: macIcon[process.env.ELECTRON_ENV],
hardenedRuntime: true,
entitlements: 'desktop/entitlements.mac.plist',
entitlementsInherit: 'desktop/entitlements.mac.plist',
type: 'distribution',
notarize: {
teamId: '368M544MTT',
},
target: [
{
target: 'default',
arch: ['universal'],
},
],
},
dmg: {
title: 'New Expensify',
artifactName: 'NewExpensify.dmg',
internetEnabled: true,
},
publish: [
{
provider: 's3',
bucket: s3Bucket[process.env.ELECTRON_ENV],
channel: 'latest',
path: s3Path[process.env.ELECTRON_ENV],
},
],
files: ['dist', '!dist/www/{.well-known,favicon*}'],
directories: {
app: 'desktop',
output: 'desktop-build',
},
protocols: {
name: 'New Expensify',
schemes: ['new-expensify'],
},
};