mirror of
https://github.com/bitwarden/browser
synced 2026-02-02 01:33:22 +00:00
Change sign.js to sign .appx
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
/* eslint-disable @typescript-eslint/no-require-imports, no-console */
|
||||
|
||||
exports.default = async function (configuration) {
|
||||
if (parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 && configuration.path.slice(-4) == ".exe") {
|
||||
if (
|
||||
parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 &&
|
||||
(configuration.path.endsWith(".exe") ||
|
||||
configuration.path.endsWith(".appx") ||
|
||||
configuration.path.endsWith(".msix"))
|
||||
) {
|
||||
console.log(`[*] Signing file: ${configuration.path}`);
|
||||
require("child_process").execSync(
|
||||
`azuresigntool sign -v ` +
|
||||
@@ -19,20 +24,19 @@ exports.default = async function (configuration) {
|
||||
},
|
||||
);
|
||||
} else if (process.env.ELECTRON_BUILDER_SIGN_CERT) {
|
||||
const certFile = process.env.ELECTRON_BUILDER_SIGN_CERT
|
||||
const certPw = process.env.ELECTRON_BUILDER_SIGN_CERT_PW
|
||||
const certFile = process.env.ELECTRON_BUILDER_SIGN_CERT;
|
||||
const certPw = process.env.ELECTRON_BUILDER_SIGN_CERT_PW;
|
||||
console.log(`[*] Signing file: ${configuration.path} with ${certFile}`);
|
||||
require("child_process").execSync(
|
||||
"signtool.exe sign" +
|
||||
" /fd SHA256" +
|
||||
" /a" +
|
||||
` /f "${certFile}"` +
|
||||
` /p "${process.env.ELECTRON_BUILDER_SIGN_CERT_PW}"` +
|
||||
` "${configuration.path}"`,
|
||||
" /fd SHA256" +
|
||||
" /a" +
|
||||
` /f "${certFile}"` +
|
||||
` /p "${process.env.ELECTRON_BUILDER_SIGN_CERT_PW}"` +
|
||||
` "${configuration.path}"`,
|
||||
{
|
||||
stdio: "inherit",
|
||||
},
|
||||
);
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user