Skip to content

Commit

Permalink
temp: add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicole-obrien committed Oct 12, 2023
1 parent a5268d2 commit 1aa360c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/desktop/electron-builder-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ function getIconPath(): string {
}

async function notarizeMacos(appBundleId, appName): Promise<void> {
console.log('Notarization - start')
console.log('Notarization - appBundleId', appBundleId)
console.log('Notarization - appName', appName)
console.log('Notarization - process.platform', process.platform)
console.log('Notarization - process.env.MACOS_SKIP_NOTARIZATION', process.env.MACOS_SKIP_NOTARIZATION)

if (process.platform !== 'darwin' || process.env.MACOS_SKIP_NOTARIZATION === 'true') {
return
}
Expand All @@ -59,20 +65,25 @@ async function notarizeMacos(appBundleId, appName): Promise<void> {
const APPLE_ID_PASSWORD = process.env.BLOOM_APPLE_ID_PASSWORD

if (!APPLE_ID) {
console.log('Notarization - failed: Environment variable "BLOOM_APPLE_ID" is not defined')
throw Error('Notarization failed: Environment variable "BLOOM_APPLE_ID" is not defined')
}

if (!APPLE_ID_PASSWORD) {
console.log('Notarization - failed: Environment variable "BLOOM_APPLE_ID_PASSWORD" is not defined')
throw Error('Notarization failed: Environment variable "BLOOM_APPLE_ID_PASSWORD" is not defined')
}

console.log('Notarization - start notarization')
await notarize({
appBundleId: appBundleId,
appPath: path.resolve(__dirname, `../out/mac/${appName}.app`),
appleId: APPLE_ID,
appleIdPassword: APPLE_ID_PASSWORD,
ascProvider: 'C2FJNDH9G2',
teamId: 'C2FJNDH9G2',
})
console.log('Notarization - finished')
}

const prodConfig: Configuration = {
Expand All @@ -87,6 +98,7 @@ const prodConfig: Configuration = {
try {
await notarizeMacos(APP_ID, APP_NAME)
} catch (err) {
console.log('Notarization - failed', err)
// This catch is necessary or the promise rejection is swallowed
throw err
}
Expand Down

0 comments on commit 1aa360c

Please sign in to comment.