generated from AgileAppstate/classroom-assistant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
forge.config.js
121 lines (118 loc) · 3.06 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
const fs = require("fs-extra")
const appInfo = JSON.stringify({})
// eslint-disable-next-line space-before-function-paren
function getWindowsCertificatePassword() {
if (process.env.KEY_PASSWORD) {
return process.env.KEY_PASSWORD
} else {
console.log("Skipping Windows Certificate Password")
}
}
module.exports = {
packagerConfig: {
asar: false, // TODO: true for release
darwinDarkModeSupport: "true",
packageManager: "npm",
osxSign: {
entitlements: "entitlements.plist",
"entitlements-inherit": "entitlements.plist",
"gatekeeper-assess": false,
hardenedRuntime: true,
identity: "Developer ID Application: GitHub (VEKTX9H2N7)"
},
osxNotarize: {
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASSWORD
},
executableName: "classroom-assistant",
icon: "./app/resources/icon.icns",
protocols: [
{
name: "Classroom Assistant",
schemes: ["x-github-classroom"],
},
],
},
makers: [
{
name: "@electron-forge/maker-zip",
},
{
name: "@electron-forge/maker-squirrel",
config: {
name: "classroom-assistant",
title: "classroom-assistant",
exe: "classroom-assistant.exe",
iconUrl: "https://raw.githubusercontent.com/education/classroom-assistant/master/app/resources/icon.ico",
setupIcon: "./app/resources/icon.ico",
loadingGif: "./app/resources/images/win32-installer-splash.gif",
certificateFile: "./script/windows-certificate.pfx",
certificatePassword: getWindowsCertificatePassword(),
},
},
{
name: "@electron-forge/maker-deb",
config: {
options: {
icon: "./app/resources/images/classroom-logo.png",
categories: ["Education"],
homepage: "https://classroom.github.com/assistant",
},
},
},
{
name: "@electron-forge/maker-rpm",
config: {
options: {
icon: "./app/resources/images/classroom-logo.png",
categories: ["Education"],
homepage: "https://classroom.github.com/assistant",
},
},
},
],
publishers: [
{
name: "@electron-forge/publisher-github",
config: {
repository: {
owner: "education",
name: "classroom-assistant"
},
prerelease: true
}
}
],
windowsStoreConfig: {
packageName: "",
name: "classroom-assistant"
},
hooks: {
generateAssets: async () => {
return new Promise((resolve, reject) =>
fs.writeFile("./app/app-info.json", appInfo, (e) => {
if (e) reject(e)
else resolve()
})
)
},
},
plugins: [
[
"@electron-forge/plugin-webpack",
{
mainConfig: "./webpack.main.config.js",
renderer: {
config: "./webpack.renderer.config.js",
entryPoints: [
{
html: "./app/index.html",
js: "./app/index.jsx",
name: "main_window",
},
],
},
},
],
],
}