Skip to content

Commit

Permalink
macOS: Make both notarize() calls consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
scottnonnenberg-signal committed Oct 30, 2023
1 parent cb0517d commit 8045e97
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions ts/scripts/notarize-universal-dmg.ts
Expand Up @@ -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)
);
Expand All @@ -57,10 +65,12 @@ export async function afterAllArtifactBuild({

const [dmgPath] = artifactsToStaple;
console.log(`Notarizing dmg: ${dmgPath}`);

await notarize({
appBundleId,
appPath: dmgPath,
appleId,
appleIdPassword,
teamId,
});
}
2 changes: 1 addition & 1 deletion ts/scripts/notarize.ts
Expand Up @@ -59,7 +59,7 @@ export async function afterSign({
console.log(` file: ${appPath}`);

await notarize({
tool: 'notarytool',
appBundleId,
appPath,
appleId,
appleIdPassword,
Expand Down

0 comments on commit 8045e97

Please sign in to comment.