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;
}
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,
});
}

View file

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