fix: signing uses the azureSignOptions schema

This commit is contained in:
ethernet 2026-08-07 19:31:09 -04:00
parent 19c0f4e5e2
commit 2a0bb64d18
1 changed files with 7 additions and 6 deletions

View File

@ -53,20 +53,21 @@ args.push(...process.argv.slice(2))
// commas, and no quoting survives the cmd.exe hops between the outer build
// script, npm's lifecycle spawn, and this script. This spawn is the first
// one with no shell in between, so values pass through verbatim.
// (azureSignOptions is the 26.x schema; the old win.sign.type=azure shape
// fails validation.)
if (
args.includes("--win") &&
process.env.AZURE_SIGN_ENDPOINT &&
process.env.AZURE_CLIENT_ID &&
!args.some((a) => a.startsWith("-c.win.sign"))
!args.some((a) => a.includes("azureSignOptions"))
) {
console.log(`[run-electron-builder] Windows signing: Azure Trusted Signing at ${process.env.AZURE_SIGN_ENDPOINT}`)
args.push(
"-c.win.signAndEditExecutable=true",
"-c.win.sign.type=azure",
`-c.win.sign.endpoint=${process.env.AZURE_SIGN_ENDPOINT}`,
`-c.win.sign.codeSigningAccountName=${process.env.AZURE_SIGN_ACCOUNT}`,
`-c.win.sign.certificateProfileName=${process.env.AZURE_SIGN_PROFILE}`,
`-c.win.sign.publisherName=${process.env.AZURE_SIGN_PUBLISHER}`
`-c.win.azureSignOptions.endpoint=${process.env.AZURE_SIGN_ENDPOINT}`,
`-c.win.azureSignOptions.codeSigningAccountName=${process.env.AZURE_SIGN_ACCOUNT}`,
`-c.win.azureSignOptions.certificateProfileName=${process.env.AZURE_SIGN_PROFILE}`,
`-c.win.azureSignOptions.publisherName=${process.env.AZURE_SIGN_PUBLISHER}`
)
}