diff --git a/electron/package.json b/electron/package.json index 86330afc..6ea396a5 100644 --- a/electron/package.json +++ b/electron/package.json @@ -50,7 +50,6 @@ ], "category": "public.app-category.developer-tools", "hardenedRuntime": true, - "notarize": false, "entitlements": "build/entitlements.mac.plist", "entitlementsInherit": "build/entitlements.mac.plist", "extraResources": [ diff --git a/electron/scripts/notarize.js b/electron/scripts/notarize.js index 4efe6afa..d0a6e7c2 100644 --- a/electron/scripts/notarize.js +++ b/electron/scripts/notarize.js @@ -12,15 +12,8 @@ exports.default = async function notarizing(context) { return; } - // Prefer a stored notarytool keychain profile: an app-specific password in env - // silently 401s the day Apple rotates it, taking a release down with it; the - // keychain profile is durable and is the canonical local-publish credential. - const keychainProfile = process.env.APPLE_KEYCHAIN_PROFILE; - const hasEnvCreds = - process.env.APPLE_ID && process.env.APPLE_APP_SPECIFIC_PASSWORD && process.env.APPLE_TEAM_ID; - - if (!keychainProfile && !hasEnvCreds) { - console.log('Skipping notarization (no APPLE_KEYCHAIN_PROFILE and no APPLE_ID/password/team)'); + if (!process.env.APPLE_ID || !process.env.APPLE_TEAM_ID) { + console.log('Skipping notarization (APPLE_ID or APPLE_TEAM_ID not set)'); return; } @@ -29,20 +22,15 @@ exports.default = async function notarizing(context) { const appName = context.packager.appInfo.productFilename; const appPath = `${appOutDir}/${appName}.app`; - if (keychainProfile) { - console.log(`Notarizing ${appPath} via keychain profile "${keychainProfile}"...`); - await notarize({ tool: 'notarytool', appPath, keychainProfile }); - } else { - console.log(`Notarizing ${appPath} via Apple ID env credentials...`); - await notarize({ - tool: 'notarytool', - appBundleId: 'com.clusterlabs.openswarm', - appPath, - appleId: process.env.APPLE_ID, - appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD, - teamId: process.env.APPLE_TEAM_ID, - }); - } + console.log(`Notarizing ${appPath}...`); + + await notarize({ + appBundleId: 'com.clusterlabs.openswarm', + appPath, + appleId: process.env.APPLE_ID, + appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD, + teamId: process.env.APPLE_TEAM_ID, + }); console.log('Notarization complete.'); };