Skip to content

Commit

Permalink
Fix app notarization
Browse files Browse the repository at this point in the history
  • Loading branch information
klembot committed Jul 8, 2023
1 parent 954b0f0 commit 1acca51
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 202 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ build:
- `APPLE_ID`: User name of the Apple account to use for notarization.
- `APPLE_ID_PASSWORD`: App-specific password for the Apple account to use for
notarization.
- `APPLE_TEAM_ID`: ID of the Apple team account to use for notarization.

If any of these environment variables are not set, the build process will skip
notarizing. This means users will need to right-click the application and open
Expand Down
10 changes: 9 additions & 1 deletion electron-builder.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,20 @@ module.exports = {
return;
}

if (!('APPLE_TEAM_ID' in process.env)) {
console.log(
'APPLE_TEAM_ID environment variable is not set, skipping notarization'
);
return;
}

console.log('Notarizing Mac app...');
await notarize({
appBundleId: process.env.APPLE_APP_ID,
appPath: path.join(context.appOutDir, `Twine.app`),
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASSWORD
appleIdPassword: process.env.APPLE_ID_PASSWORD,
teamId: process.env.APPLE_TEAM_ID
});
}
},
Expand Down
Loading

0 comments on commit 1acca51

Please sign in to comment.