macOS: Make both notarize() calls consistent

This commit is contained in:
Scott Nonnenberg 2023-10-30 15:26:30 -07:00
parent cb0517d6d7
commit 8045e97995
2 changed files with 11 additions and 1 deletions

View file

@ -47,6 +47,14 @@ export async function afterAllArtifactBuild({
return; 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 => const artifactsToStaple = artifactPaths.filter(artifactPath =>
/^.*mac-universal.*\.dmg$/.test(artifactPath) /^.*mac-universal.*\.dmg$/.test(artifactPath)
); );
@ -57,10 +65,12 @@ export async function afterAllArtifactBuild({
const [dmgPath] = artifactsToStaple; const [dmgPath] = artifactsToStaple;
console.log(`Notarizing dmg: ${dmgPath}`); console.log(`Notarizing dmg: ${dmgPath}`);
await notarize({ await notarize({
appBundleId, appBundleId,
appPath: dmgPath, appPath: dmgPath,
appleId, appleId,
appleIdPassword, appleIdPassword,
teamId,
}); });
} }

View file

@ -59,7 +59,7 @@ export async function afterSign({
console.log(` file: ${appPath}`); console.log(` file: ${appPath}`);
await notarize({ await notarize({
tool: 'notarytool', appBundleId,
appPath, appPath,
appleId, appleId,
appleIdPassword, appleIdPassword,