2022-02-24 20:50:19 +01:00
|
|
|
/* eslint-disable @typescript-eslint/no-var-requires, no-console */
|
|
|
|
|
2021-12-20 15:47:17 +01:00
|
|
|
exports.default = async function (configuration) {
|
|
|
|
if (parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 && configuration.path.slice(-4) == ".exe") {
|
|
|
|
console.log(`[*] Signing file: ${configuration.path}`);
|
2021-01-06 19:58:44 +01:00
|
|
|
require("child_process").execSync(
|
2021-09-16 19:15:05 +02:00
|
|
|
`azuresigntool sign -v ` +
|
2021-12-20 15:47:17 +01:00
|
|
|
`-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}`,
|
2021-01-06 19:58:44 +01:00
|
|
|
{
|
2021-12-20 15:47:17 +01:00
|
|
|
stdio: "inherit",
|
2023-11-29 22:15:20 +01:00
|
|
|
},
|
2021-01-06 19:58:44 +01:00
|
|
|
);
|
|
|
|
}
|
2020-12-30 22:19:12 +01:00
|
|
|
};
|