From 323bc78977cf978724e0a3c27a5b6db6c9cdbb12 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 24 Jul 2019 17:29:25 -0400 Subject: [PATCH] load apple id and password properly for notarize --- .gitignore | 1 + scripts/notarize.js | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index bd0a68928a..850ba7df70 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ yarn-error.log .DS_Store *.nupkg *.provisionprofile +*.env diff --git a/scripts/notarize.js b/scripts/notarize.js index 95880e4062..e8c070beaa 100644 --- a/scripts/notarize.js +++ b/scripts/notarize.js @@ -1,3 +1,4 @@ +require('dotenv').config(); const { notarize } = require('electron-notarize'); exports.default = async function notarizing(context) { @@ -5,11 +6,12 @@ exports.default = async function notarizing(context) { if (electronPlatformName !== 'darwin') { return; } + const appleId = process.env.APPLEID; const appName = context.packager.appInfo.productFilename; return await notarize({ appBundleId: 'com.bitwarden.desktop', - appPath: appOutDir + '/' + appName + '.app', - appleId: '@keychain:"Apple Id Notarization Id"', - appleIdPassword: '@keychain:"Apple Id Notarization Password"', + appPath: `${appOutDir}/${appName}.app`, + appleId: appleId, + appleIdPassword: `@keychain:AC_PASSWORD`, }); };