load apple id and password properly for notarize

This commit is contained in:
Kyle Spearrin 2019-07-24 17:29:25 -04:00
parent 8beaf6c6dd
commit 323bc78977
2 changed files with 6 additions and 3 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@ yarn-error.log
.DS_Store .DS_Store
*.nupkg *.nupkg
*.provisionprofile *.provisionprofile
*.env

View File

@ -1,3 +1,4 @@
require('dotenv').config();
const { notarize } = require('electron-notarize'); const { notarize } = require('electron-notarize');
exports.default = async function notarizing(context) { exports.default = async function notarizing(context) {
@ -5,11 +6,12 @@ exports.default = async function notarizing(context) {
if (electronPlatformName !== 'darwin') { if (electronPlatformName !== 'darwin') {
return; return;
} }
const appleId = process.env.APPLEID;
const appName = context.packager.appInfo.productFilename; const appName = context.packager.appInfo.productFilename;
return await notarize({ return await notarize({
appBundleId: 'com.bitwarden.desktop', appBundleId: 'com.bitwarden.desktop',
appPath: appOutDir + '/' + appName + '.app', appPath: `${appOutDir}/${appName}.app`,
appleId: '@keychain:"Apple Id Notarization Id"', appleId: appleId,
appleIdPassword: '@keychain:"Apple Id Notarization Password"', appleIdPassword: `@keychain:AC_PASSWORD`,
}); });
}; };