-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforge.config.js
77 lines (74 loc) · 1.84 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
require('dotenv').config();
const iconset = require('./src/iconset');
const EXECUTABLE_NAME = 'LeoBar';
let publishers = [];
let packagerConfig = {
name: EXECUTABLE_NAME,
executableName: EXECUTABLE_NAME,
icon: iconset.getAppIconPath(),
appBundleId: 'com.vvvoin.leobar',
extendInfo: {
LSUIElement: 'true',
},
};
let rebuildConfig = {};
let makers = [
{
name: '@electron-forge/maker-squirrel',
config: {
setupIcon: iconset.getAppIconIcoPath(),
},
},
{
name: '@electron-forge/maker-dmg',
platforms: ['darwin'],
config: {
// Dirty hack - use unsupported format
// so appdmg would set default DMG icon.
// Without it electron icon would be used.
icon: iconset.getAppIconPngPath(),
// Faster, but OS X 10.11+ only.
format: 'ULFO',
},
},
{
name: '@electron-forge/maker-deb',
config: {
options: {
bin: 'LeoBar',
},
},
},
];
if (process.env.NODE_ENV == 'production') {
// Prevents accidental publishing of non-production builds.
publishers = publishers.concat([
{
name: '@electron-forge/publisher-github',
config: {
repository: {
owner: 'vvvar',
name: 'leo-bar',
},
prerelease: true,
draft: true,
},
},
]);
// Since signings is slow, do it only for production builds.
packagerConfig = Object.assign(packagerConfig, {
osxSign: {
hardenedRuntime: false,
gatekeeperAssess: false,
identity: process.env.MACOS_APPLE_IDENTITY,
},
osxNotarize: {
appBundleId: 'com.vvvoin.leobar',
tool: 'notarytool',
appleId: process.env.MACOS_APPLE_ID,
appleIdPassword: process.env.MACOS_APPLE_PASSWORD,
teamId: process.env.MACOS_APPLE_TEAM_ID,
},
});
}
module.exports = { publishers, packagerConfig, rebuildConfig, makers };