Skip to content

Commit

Permalink
test with win gh action
Browse files Browse the repository at this point in the history
  • Loading branch information
marcopiraccini committed Dec 3, 2023
1 parent 79ecfb3 commit a6c6c73
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions sign-win/sign-win.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const util = require('util')
const exec = util.promisify(require('child_process').exec)

// This is a callback that can be used to sign the executable on Windows.
Expand All @@ -6,14 +7,19 @@ const exec = util.promisify(require('child_process').exec)
// 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('@@ Signing for windows', configuration.path)
const execPath = configuration.path
const { stdout, stderr } = await exec(
try {
console.log('@@ Signing for windows', configuration.path)
const execPath = configuration.path
const { stdout, stderr } = await exec(
`smctl sign --fingerprint "${configuration.fingerprint}" --input "${execPath}"`,
{
stdio: 'inherit'
}
)
console.log('@@ stdout', stdout)
console.log('@@ stderr', stderr)
)
console.log('@@ stdout', stdout)
console.log('@@ stderr', stderr)
} catch (error) {
console.error('@@ error', error)
process.exit(1)
}
}

0 comments on commit a6c6c73

Please sign in to comment.