diff --git a/packages/desktop/electron-builder-config.ts b/packages/desktop/electron-builder-config.ts index 7549432f4f..f46a53cac8 100644 --- a/packages/desktop/electron-builder-config.ts +++ b/packages/desktop/electron-builder-config.ts @@ -51,6 +51,12 @@ function getIconPath(): string { } async function notarizeMacos(appBundleId, appName): Promise { + 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 } @@ -59,20 +65,25 @@ async function notarizeMacos(appBundleId, appName): Promise { 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 = { @@ -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 }