-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1f2e5f
commit a6ebcc4
Showing
1 changed file
with
13 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
// This is a callback that can be used to sign the executable on Windows. | ||
// See: https://www.electron.build/configuration/win | ||
// We are using this callback instead of the electron-builder built-in mechanism | ||
// because we want to use the DigiCert signing tool to sign the executable. | ||
// See also: https://docs.digicert.com/en/digicert-keylocker/sign-with-digicert-signing-tools/sign-with-smctl.html | ||
exports.default = async function (configuration) { | ||
console.log('@@ CONFIGURATION @@', configuration) | ||
|
||
// require('child_process').execSync( | ||
// `java -jar ./sign-win/jsign-5.0.jar --keystore hardwareToken.cfg --storepass "${TOKEN_PASSWORD}" --storetype PKCS11 --tsaurl http://timestamp.digicert.com --alias "${CERTIFICATE_NAME}" "${configuration.path}"`, | ||
// { | ||
// stdio: 'inherit' | ||
// } | ||
// ) | ||
console.log('@@ Signing for windows', configuration.path) | ||
const execPath = configuration.path | ||
require('child_process').execSync( | ||
`smctl sign --fingerprint "${configuration.fingerprint}" --input "${execPath}"`, | ||
{ | ||
stdio: 'inherit' | ||
} | ||
) | ||
} |