Isaiah Inuwa 15 hours ago committed by GitHub
parent
commit
7a5ebed621
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 19
      apps/desktop/sign.js

19
apps/desktop/sign.js

@ -18,5 +18,24 @@ exports.default = async function (configuration) { @@ -18,5 +18,24 @@ exports.default = async function (configuration) {
stdio: "inherit",
},
);
} 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;
console.log(`[*] Signing file: ${configuration.path} with ${certFile}`);
if (process.platform === "win32") {
require("child_process").execSync(
"signtool.exe sign" +
" /fd SHA256" +
" /a" +
` /f "${certFile}"` +
` /p "${certPw}"` +
` "${configuration.path}"`,
{
stdio: "inherit",
},
);
} else {
console.warn("Signing Windows executables on non-Windows platforms is not supported.");
}
}
};

Loading…
Cancel
Save