refactor(forge): deduplicate windows signing configuration

This commit is contained in:
Elian Doran 2025-03-24 17:04:22 +02:00
parent 34043a8a70
commit 9aaada3f6e
No known key found for this signature in database

View File

@ -10,6 +10,9 @@ const baseLinuxMakerConfigOptions = {
desktopTemplate: path.resolve(path.join(BIN_PATH, "desktop.ejs")), desktopTemplate: path.resolve(path.join(BIN_PATH, "desktop.ejs")),
categories: ["Office", "Utility"] categories: ["Office", "Utility"]
}; };
const windowsSignConfiguration = {
hookModulePath: path.join(BIN_PATH, "sign-windows.cjs")
}
module.exports = { module.exports = {
// we run electron-forge inside the ./build folder, // we run electron-forge inside the ./build folder,
@ -27,9 +30,7 @@ module.exports = {
appleIdPassword: process.env.APPLE_ID_PASSWORD, appleIdPassword: process.env.APPLE_ID_PASSWORD,
teamId: process.env.APPLE_TEAM_ID teamId: process.env.APPLE_TEAM_ID
}, },
windowsSign: { windowsSign: windowsSignConfiguration,
hookModulePath: path.join(BIN_PATH, "sign-windows.cjs")
},
extraResource: [ extraResource: [
// All resources should stay in Resources directory for macOS // All resources should stay in Resources directory for macOS
...(process.platform === "darwin" ? [] : extraResourcesForPlatform), ...(process.platform === "darwin" ? [] : extraResourcesForPlatform),
@ -110,9 +111,7 @@ module.exports = {
iconUrl: "https://raw.githubusercontent.com/TriliumNext/Notes/develop/images/app-icons/icon.ico", iconUrl: "https://raw.githubusercontent.com/TriliumNext/Notes/develop/images/app-icons/icon.ico",
setupIcon: "./images/app-icons/win/setup.ico", setupIcon: "./images/app-icons/win/setup.ico",
loadingGif: "./images/app-icons/win/setup-banner.gif", loadingGif: "./images/app-icons/win/setup-banner.gif",
windowsSign: { windowsSign: windowsSignConfiguration
hookModulePath: path.join(BIN_PATH, "sign-windows.cjs")
}
} }
}, },
{ {