2020-12-30 22:19:12 +01:00
|
|
|
exports.default = async function(configuration) {
|
2021-01-06 20:33:43 +01:00
|
|
|
|
|
|
|
console.log('+++++++++++++++++++++++++++++++++++++++++++++++++++')
|
|
|
|
console.log(`ELECTRON_BUILDER_SIGN: ${process.env.ELECTRON_BUILDER_SIGN}`)
|
|
|
|
console.log(`Type: ${typeof process.env.ELECTRON_BUILDER_SIGN}`)
|
|
|
|
console.log('+++++++++++++++++++++++++++++++++++++++++++++++++++')
|
|
|
|
|
2021-01-06 20:43:42 +01:00
|
|
|
if (parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1) {
|
2021-01-06 19:58:44 +01:00
|
|
|
require("child_process").execSync(
|
|
|
|
`azuresigntool sign ` +
|
|
|
|
`-kvu ${process.env.SIGNING_VAULT_URL} ` +
|
|
|
|
`-kvi ${process.env.SIGNING_CLIENT_ID} ` +
|
|
|
|
`-kvt ${process.env.SIGNING_TENANT_ID} ` +
|
|
|
|
`-kvs ${process.env.SIGNING_CLIENT_SECRET} ` +
|
|
|
|
`-kvc ${process.env.SIGNING_CERT_NAME} ` +
|
|
|
|
`-fd ${configuration.hash} ` +
|
|
|
|
`-du ${configuration.site} ` +
|
|
|
|
`-tr http://timestamp.digicert.com ` +
|
|
|
|
`${configuration.path}`,
|
|
|
|
{
|
|
|
|
stdio: "inherit"
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
2020-12-30 22:19:12 +01:00
|
|
|
};
|