-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make builds using the new ssl.com code signing certificate
- Loading branch information
Showing
10 changed files
with
146 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
const { execSync } = require('child_process'); | ||
const zuiPackage = require('./package.json') | ||
|
||
const config = { | ||
appId: "io.brimdata.zui", | ||
asar: true, | ||
asarUnpack: ["zdeps", "LICENSE.txt", "acknowledgments.txt", "**/*.node"], | ||
directories: {output: "../../dist/apps/zui"}, | ||
protocols: [{name: "zui", "schemes": ["zui"]}], | ||
win: {target: ["nsis"]}, | ||
linux: {target: ["deb", "rpm"]}, | ||
rpm: {depends: ["openssl"]}, | ||
deb: {depends: ["openssl"]}, | ||
nsis: {oneClick: false, perMachine: false}, | ||
forceCodeSigning: true, | ||
afterSign: "electron-builder-notarize", | ||
publish: { | ||
provider: "github" | ||
}, | ||
files: [ | ||
"dist/**", | ||
"out/**", | ||
"build/**", | ||
"zdeps/**", | ||
"LICENSE.txt", | ||
"acknowledgments.txt", | ||
"package.json" | ||
], | ||
} | ||
|
||
// Code below for code signing with SSL.com cert in electron-builder via GitHub | ||
// Actions taken from: | ||
// https://github.com/electron-userland/electron-builder/issues/6158#issuecomment-1994110062 | ||
if (process.env.CODE_SIGN_SCRIPT_PATH) { | ||
const version = zuiPackage.version; | ||
const productName = zuiPackage.productName; | ||
const versionedExe = `${productName} Setup ${version}.exe`; | ||
|
||
config.win.sign = (configuration) => { | ||
console.log("Requested signing for ", configuration.path); | ||
|
||
// Only proceed if the versioned exe file is in the configuration path - skip signing everything else | ||
if (!configuration.path.includes(versionedExe)) { | ||
console.log("Configuration path does not include the versioned exe, signing skipped."); | ||
return true; | ||
} | ||
|
||
const scriptPath = process.env.CODE_SIGN_SCRIPT_PATH; | ||
|
||
try { | ||
// Execute the sign script synchronously | ||
const output = execSync(`node "${scriptPath}"`).toString(); | ||
console.log(`Script output: ${output}`); | ||
} catch (error) { | ||
console.error(`Error executing script: ${error.message}`); | ||
if (error.stdout) { | ||
console.log(`Script stdout: ${error.stdout.toString()}`); | ||
} | ||
if (error.stderr) { | ||
console.error(`Script stderr: ${error.stderr.toString()}`); | ||
} | ||
return false; | ||
} | ||
|
||
return true; // Return true at the end of successful signing | ||
}; | ||
|
||
// Sign only for Windows 10 and above | ||
config.win.signingHashAlgorithms = ["sha256"]; | ||
|
||
} | ||
|
||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
const config = { | ||
extends: "./electron-builder-config.js", | ||
appId: "io.brimdata.zui-insiders", | ||
mac: { | ||
icon: "build/insiders/icon.icns" | ||
}, | ||
win: { | ||
icon: "build/insiders/icon.ico" | ||
}, | ||
publish: { | ||
provider: "github", | ||
releaseType: "release" | ||
} | ||
} | ||
|
||
module.exports = config; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters