-
Notifications
You must be signed in to change notification settings - Fork 0
/
forge.config.js
94 lines (93 loc) · 2.81 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
const { execSync } = require("child_process")
module.exports = {
packagerConfig: {
asar: false,
name: "paradisec-data-loader",
ignore: [
"^/src",
"^/build",
"^/electron.vite.config.js",
"^/forge.config.js",
"^/postcss.config.js",
"^/tailwind.config.js",
"^/README.md"
],
osxSign: {
optionsForFile: (filePath) => {
// Here, we keep it simple and return a single entitlements.plist file.
// You can use this callback to map different sets of entitlements
// to specific files in your packaged app.
return {
entitlements: "./build/entitlements.mac.plist"
}
}
},
osxNotarize: {
tool: "notarytool",
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_PASSWORD,
teamId: process.env.APPLE_TEAM_ID
}
},
rebuildConfig: {},
makers: [
{
name: "@electron-forge/maker-dmg",
config: {
format: "ULFO"
}
},
{
name: "@electron-forge/maker-squirrel",
config: {}
},
{
name: "@electron-forge/maker-zip"
},
{
name: "@electron-forge/maker-deb",
config: {}
},
{
name: "@electron-forge/maker-rpm",
config: {}
}
],
publishers: [
{
name: "@electron-forge/publisher-github",
config: {
repository: {
owner: "coedl",
name: "data-loader"
},
prerelease: true
}
}
],
hooks: {
generateAssets: async (forgeConfig, platform, arch) => {
execSync("npm run build:app")
},
prePackage: async (forgeConfig, platform, arch) => {
if (!process.env.GITHUB_TOKEN) {
console.log("")
console.log(`In order to publish you need to set process.env.GITHUB_TOKEN`)
process.exit()
}
if (
platform === "darwin" &&
(!process.env.APPLE_ID || !process.env.APPLE_PASSWORD || !process.env.APPLE_TEAM_ID)
) {
console.log("")
console.log(
`To build a MacOS distributable define process.env.{APPLE_ID, APPLE_PASSWORD, APPLE_TEAM_ID}`
)
console.log(
`See https://www.electronforge.io/guides/code-signing/code-signing-macos#osxnotarize-options for more information`
)
process.exit()
}
}
}
}