Skip to content

Commit

Permalink
Adding CI mode to disable dry-run
Browse files Browse the repository at this point in the history
  • Loading branch information
doggydogworld committed Feb 20, 2025
1 parent c5feae5 commit f789366
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/mac-distribution/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ type GlobalFlags struct {
BundleID string `group:"notarization creds" and:"notarization creds" env:"BUNDLE_ID" help:"Bundle ID is a unique identifier used for codesigning & notarization. Required for notarization."`
TeamID string `group:"notarization creds" and:"notarization creds" env:"TEAM_ID" help:"Team ID is the unique identifier for the Apple Developer account."`

CI bool `hidden:"" env:"CI" help:"CI mode. Disables dry-run."`

notaryTool *notarize.Tool
}

Expand Down Expand Up @@ -110,6 +112,10 @@ func (g *GlobalFlags) AfterApply() error {
return trace.BadParameter("notarization credentials required, use --dry-run to skip")
}

if g.CI && g.DryRun {
return trace.BadParameter("dry-run mode cannot be used in CI")
}

extraOpts := []notarize.Opt{}

if g.DryRun {
Expand Down

0 comments on commit f789366

Please sign in to comment.