Skip to content

Commit 15eb66b

Browse files
authored
Merge pull request #51 from kittaakos/notarize-on-non-ci
feat(build): Can notarize the macOS app on non-CI
2 parents 44bd0f6 + 5377289 commit 15eb66b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

build_resources/notarize.js

+10
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,18 @@ const { notarize } = require('electron-notarize');
1818

1919
exports.default = async function notarizing(context) {
2020
if (!isCI) {
21+
if (
22+
typeof process.env.MACOS_FORCE_NOTARIZE === 'string' &&
23+
/true/i.test(process.env.MACOS_FORCE_NOTARIZE)
24+
) {
25+
// Hack for manual M1 signing. Set the MACOS_FORCE_NOTARIZE env variable to true, to force notarization when not on a CI. The 'true' is case insensitive.
26+
console.log(
27+
`Detected the 'MACOS_FORCE_NOTARIZE' environment variable with '${process.env.MACOS_FORCE_NOTARIZE}' value. Forcing the app notarization, although not on a CI.`
28+
);
29+
} else {
2130
console.log('Skipping notarization: not on CI.');
2231
return;
32+
}
2333
}
2434
if (process.env.IS_FORK === 'true') {
2535
console.log('Skipping the app notarization: building from a fork.');

0 commit comments

Comments
 (0)