Skip to content

Commit

Permalink
chore(project): skip notarization for non-release
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac authored and nikku committed Nov 15, 2019
1 parent bf6a0d5 commit b4704f4
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions tasks/after-sign/notarize.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,43 @@ const { isPullRequest } = require('builder-util');
module.exports = async function(context) {
const {
electronPlatformName,
appOutDir
appOutDir,
packager
} = context;

if (electronPlatformName !== 'darwin') {
return;
}

if (isPullRequest()) {
console.log(' • skipping notarization for pull request');
console.log(' • skipped notarization for pull request');

return;
}

const {
APPLE_DEVELOPER_ID: appleId,
APPLE_DEVELOPER_ID_PASSWORD: appleIdPassword
} = process.env;

const {
productFilename: appName,
info: {
config: {
appId
options: {
publish
}
}
} = context.packager.appInfo;
} = packager;

if (publish !== 'always') {
console.log(' • skipped notarization for non-release');

return;
}

const {
appId,
productName: appName
} = packager.config;

const {
APPLE_DEVELOPER_ID: appleId,
APPLE_DEVELOPER_ID_PASSWORD: appleIdPassword
} = process.env;

const appPath = `${appOutDir}/${appName}.app`;

Expand Down

0 comments on commit b4704f4

Please sign in to comment.