1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-13 14:53:16 +00:00
Files
directory-connector/scripts/sign.js
2025-12-12 12:33:49 -06:00

27 lines
816 B
JavaScript

/* eslint-disable no-console */
import { execSync } from "child_process";
export default async function (configuration) {
if (
parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 &&
configuration.path.slice(-4) === ".exe"
) {
console.log(`[*] Signing file: ${configuration.path}`);
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",
},
);
}
}