2020-12-30 21:19:12 +00:00
|
|
|
exports.default = async function(configuration) {
|
2021-01-15 17:19:34 +00:00
|
|
|
if (
|
|
|
|
parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 &&
|
2021-01-24 23:23:41 +00:00
|
|
|
configuration.path.slice(-4) == ".exe"
|
2021-01-15 17:19:34 +00:00
|
|
|
) {
|
2021-01-15 17:42:44 +00:00
|
|
|
console.log(`[*] Signing file: ${configuration.path}`)
|
2021-01-06 18:58:44 +00: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 21:19:12 +00:00
|
|
|
};
|