From 8045e97995460c4cf92e1e5d57998caf06145f58 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Mon, 30 Oct 2023 15:26:30 -0700 Subject: [PATCH] macOS: Make both notarize() calls consistent --- ts/scripts/notarize-universal-dmg.ts | 10 ++++++++++ ts/scripts/notarize.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ts/scripts/notarize-universal-dmg.ts b/ts/scripts/notarize-universal-dmg.ts index 827ecfa04cd..00a7be358e7 100644 --- a/ts/scripts/notarize-universal-dmg.ts +++ b/ts/scripts/notarize-universal-dmg.ts @@ -47,6 +47,14 @@ export async function afterAllArtifactBuild({ return; } + const teamId = process.env.APPLE_TEAM_ID; + if (!teamId) { + console.warn( + 'teamId must be provided in environment variable APPLE_TEAM_ID' + ); + return; + } + const artifactsToStaple = artifactPaths.filter(artifactPath => /^.*mac-universal.*\.dmg$/.test(artifactPath) ); @@ -57,10 +65,12 @@ export async function afterAllArtifactBuild({ const [dmgPath] = artifactsToStaple; console.log(`Notarizing dmg: ${dmgPath}`); + await notarize({ appBundleId, appPath: dmgPath, appleId, appleIdPassword, + teamId, }); } diff --git a/ts/scripts/notarize.ts b/ts/scripts/notarize.ts index 56740ad2dee..5e65eef9d25 100644 --- a/ts/scripts/notarize.ts +++ b/ts/scripts/notarize.ts @@ -59,7 +59,7 @@ export async function afterSign({ console.log(` file: ${appPath}`); await notarize({ - tool: 'notarytool', + appBundleId, appPath, appleId, appleIdPassword,