forked from raindropio/desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
forge.config.js
95 lines (92 loc) · 3.16 KB
/
forge.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
const path = require('path')
const util = require('util')
const exec = util.promisify(require('child_process').exec)
module.exports = {
hooks: {
generateAssets: async () => {
//build app from github repo
await exec('shx rm -rf out/app')
await exec('git clone https://github.com/raindropio/app.git -b release/production out/app')
await exec('cd out/app && yarn && yarn build:electron')
await exec('shx rm -rf app-bundle || true')
await exec('shx cp -r out/app/dist/electron/prod app-bundle')
await exec('shx rm -rf out/app')
},
},
packagerConfig: {
icon: './build/icon',
//mac specific
appCategoryType: 'public.app-category.productivity',
appCopyright: '© 2013-2019 Mussabekov Rustem',
appBundleId: 'io.raindrop.macapp',
osxSign: {
hardenedRuntime: true,
'gatekeeper-assess': false,
entitlements: './build/mac/entitlements.mac.plist',
'entitlements-inherit':'./build/mac/entitlements.mac.plist'
},
osxNotarize: {
appleId: process.env['APPLE_ID'],
appleIdPassword: process.env['APPLE_ID_PASSWORD']
},
asar: true,
prune: true,
ignore: [
/^build$/,
/^out$/,
/^\.gitignore$/,
/^\.git$/,
/^forge\.config\.js$/,
/^yarn\.lock$/,
/^\.DS_Store$/,
],
},
makers: [
{
name: '@electron-forge/maker-zip',
platforms: [
'darwin'
]
},
{
name: '@electron-forge/maker-dmg',
config: {
name: 'Raindrop',
background: './build/mac/dmg@2x.png',
format: 'ULFO',
icon: './build/icon.icns',
iconSize: 128,
overwrite: true,
contents: options => ([
{x: 530, y: 245, type: 'link', path: '/Applications'},
{x: 259, y: 245, type: 'file', path: options.appPath},
]),
additionalDMGOptions: {
window: {size: {width: 780, height: 435}}
},
}
},
{
name: '@electron-forge/maker-squirrel',
config: {
iconUrl: 'https://raindrop.io/favicon.ico',
loadingGif: path.resolve(__dirname, 'build', 'win', 'loadingGif.gif'),
setupIcon: path.resolve(__dirname, 'build', 'icon.ico'),
setupExe: 'RaindropInstaller.exe'
}
}
],
publishers: [
{
name: '@electron-forge/publisher-github',
config: {
repository: {
owner: 'raindropio',
name: 'desktop'
},
draft: process.env['GITHUB_WORKFLOW'] ? false : true, //only github builds are publicly visible
prerelease: false
}
}
]
}