Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(mac): only skip notarization step when notarize is explicitly false #8065

Merged
merged 5 commits into from Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/twelve-boxes-film.md
@@ -0,0 +1,5 @@
---
"app-builder-lib": patch
---

fix(mac): only skip notarization step when `notarize` is explicitly false
7 changes: 4 additions & 3 deletions packages/app-builder-lib/src/macPackager.ts
Expand Up @@ -498,12 +498,13 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {

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)
if (!options) {
log.warn({ reason: "`notarize` options were unable to be generated" }, "skipped macOS notarization")
return
}
await notarize(options)
Expand Down Expand Up @@ -561,7 +562,7 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
}
return proj
}
const { teamId } = options as NotarizeNotaryOptions
const teamId = (options as NotarizeNotaryOptions)?.teamId
if ((teamId || options === true) && (legacyLogin || notaryToolLogin)) {
const proj: NotaryToolStartOptions = {
appPath,
Expand Down