Skip app notarization when packaging (#596)

This commit is contained in:
alalamav 2020-03-02 16:30:56 -05:00 • committed by GitHub
parent fe11e885c5
commit c1c084e1dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,9 @@ const {notarize} = require('electron-notarize');
// and `APPLE_PASSWORD`, the password to the account.
exports.default = async function(context) {
const {electronPlatformName, appOutDir} = context;
if (electronPlatformName !== 'darwin') {
if (electronPlatformName !== 'darwin' || !process.env.CSC_LINK) {
// Skip notarization if not releasing macOS or if the app is unsigned (i.e. packaging).
// `CSC_LINK` is the path to a signing certificate; setting it makes Electron sign the app.
return;
}