From c260190ce3676c56936f737b60ea0d5d9d6d00dd Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Tue, 20 Feb 2024 09:08:31 -0800 Subject: [PATCH 1/5] fix(mac): only skip notarization step when `notarize` is explicitly false --- packages/app-builder-lib/src/macPackager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app-builder-lib/src/macPackager.ts b/packages/app-builder-lib/src/macPackager.ts index 2d84ca8dfcd..22f9d940898 100644 --- a/packages/app-builder-lib/src/macPackager.ts +++ b/packages/app-builder-lib/src/macPackager.ts @@ -498,8 +498,8 @@ export default class MacPackager extends PlatformPackager { private async notarizeIfProvided(appPath: string, buildOptions: MacConfiguration) { const notarizeOptions = buildOptions.notarize - if (!notarizeOptions) { - log.info({ reason: "`notarize` options were not provided" }, "skipped macOS notarization") + if (notarizeOptions === false) { + log.info({ reason: "`notarize` options were set explicitly `false`" }, "skipped macOS notarization") return } const options = this.getNotarizeOptions(appPath) From 3357061c0318edb018cd7112fa5a7f6e06d82ed5 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Tue, 20 Feb 2024 09:09:08 -0800 Subject: [PATCH 2/5] add changeset --- .changeset/twelve-boxes-film.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/twelve-boxes-film.md diff --git a/.changeset/twelve-boxes-film.md b/.changeset/twelve-boxes-film.md new file mode 100644 index 00000000000..e979e78ab8f --- /dev/null +++ b/.changeset/twelve-boxes-film.md @@ -0,0 +1,5 @@ +--- +"app-builder-lib": patch +--- + +fix(mac): only skip notarization step when `notarize` is explicitly false From 274a04cf2490a6f6c2440c1af569bfb549422eac Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Tue, 20 Feb 2024 09:10:50 -0800 Subject: [PATCH 3/5] add additional logging --- packages/app-builder-lib/src/macPackager.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/app-builder-lib/src/macPackager.ts b/packages/app-builder-lib/src/macPackager.ts index 22f9d940898..5bcba635efe 100644 --- a/packages/app-builder-lib/src/macPackager.ts +++ b/packages/app-builder-lib/src/macPackager.ts @@ -504,6 +504,7 @@ export default class MacPackager extends PlatformPackager { } const options = this.getNotarizeOptions(appPath) if (!options) { + log.info({ reason: "`notarize` options were unable to be generated" }, "skipped macOS notarization") return } await notarize(options) From b7549424f4c2a08e8d64e1f8500f67120b929901 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Tue, 20 Feb 2024 09:11:18 -0800 Subject: [PATCH 4/5] add additional logging --- packages/app-builder-lib/src/macPackager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app-builder-lib/src/macPackager.ts b/packages/app-builder-lib/src/macPackager.ts index 5bcba635efe..d2800348c24 100644 --- a/packages/app-builder-lib/src/macPackager.ts +++ b/packages/app-builder-lib/src/macPackager.ts @@ -504,7 +504,7 @@ export default class MacPackager extends PlatformPackager { } const options = this.getNotarizeOptions(appPath) if (!options) { - log.info({ reason: "`notarize` options were unable to be generated" }, "skipped macOS notarization") + log.warn({ reason: "`notarize` options were unable to be generated" }, "skipped macOS notarization") return } await notarize(options) From 2387fc5cc09ffbee6cbc74e7992c7c7e96118b42 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Tue, 20 Feb 2024 09:20:52 -0800 Subject: [PATCH 5/5] don't destructure if options is undefined --- packages/app-builder-lib/src/macPackager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app-builder-lib/src/macPackager.ts b/packages/app-builder-lib/src/macPackager.ts index d2800348c24..5c1a56c4eb3 100644 --- a/packages/app-builder-lib/src/macPackager.ts +++ b/packages/app-builder-lib/src/macPackager.ts @@ -562,7 +562,7 @@ export default class MacPackager extends PlatformPackager { } return proj } - const { teamId } = options as NotarizeNotaryOptions + const teamId = (options as NotarizeNotaryOptions)?.teamId if ((teamId || options === true) && (legacyLogin || notaryToolLogin)) { const proj: NotaryToolStartOptions = { appPath,