Skip to content

Commit

Permalink
Remove spctl check from Mac notarization step
Browse files Browse the repository at this point in the history
  • Loading branch information
filfreire committed Jan 10, 2023
1 parent 017f98d commit 227fcaa
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .changeset/thin-bags-tap.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"app-builder-lib": major
---

Add skipVerification flag in Mac's notarize options
Remove spctl check from Mac notarization step
7 changes: 0 additions & 7 deletions packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -3716,13 +3716,6 @@
"string"
]
},
"skipVerification": {
"description": "Skip spctl verification when notarizing. Needed in some edge-cases when running electron-builder in CI",
"type": [
"null",
"boolean"
]
},
"teamId": {
"description": "The team ID you want to notarize under. Only needed if using `notarytool`",
"type": [
Expand Down
8 changes: 1 addition & 7 deletions packages/app-builder-lib/src/macPackager.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import BluebirdPromise from "bluebird-lst"
import { deepAssign, Arch, AsyncTaskManager, exec, InvalidConfigurationError, log, use, getArchSuffix, spawn } from "builder-util"
import { deepAssign, Arch, AsyncTaskManager, exec, InvalidConfigurationError, log, use, getArchSuffix } from "builder-util"
import { signAsync } from "@electron/osx-sign"
import { SignOptions } from "@electron/osx-sign/dist/cjs/types"
import { mkdir, readdir } from "fs/promises"
Expand Down Expand Up @@ -488,12 +488,6 @@ export default class MacPackager extends PlatformPackager<MacConfiguration> {
}
const options = this.generateOptions(appPath, appleId, appleIdPassword)
await notarize(options)
// Verify
if (typeof notarizeOptions === "object" && notarizeOptions?.skipVerification) {
log.info({ reason: "`skipVerification` is explicitly set to true" }, "skipped spctl verification")
} else {
await spawn("spctl", ["-a", "-t", "open", "--context", "context:primary-signature", "-v", `"${appPath}"`])
}
log.info(null, "notarization successful")
}

Expand Down
5 changes: 0 additions & 5 deletions packages/app-builder-lib/src/options/macOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,11 +230,6 @@ export interface NotarizeOptions {
* The team ID you want to notarize under. Only needed if using `notarytool`
*/
readonly teamId?: string | null

/**
* Skip spctl verification when notarizing. Needed in some edge-cases when running electron-builder in CI
*/
readonly skipVerification?: boolean | null
}

export interface DmgOptions extends TargetSpecificOptions {
Expand Down

0 comments on commit 227fcaa

Please sign in to comment.