Skip to content

Commit

Permalink
Use increment setting value if it's set and the command line option i…
Browse files Browse the repository at this point in the history
…sn't supplied.
  • Loading branch information
samdeane committed Feb 13, 2025
1 parent ca9a8e2 commit d28c3da
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Sources/ReleaseTools/OptionParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,16 @@ class OptionParser {
}

// remember the commit counting setting if it was supplied
if let buildOptions {
// ... on the command line
incrementBuildTag = buildOptions.incrementTag
} else if let setting = getDefault(for: "increment-tag") {
// ... or as a default setting
if let setting = getDefault(for: "increment-tag") {
// ... as a default setting
incrementBuildTag = setting == "true"
}

if let buildOptions, buildOptions.incrementTag {
// ... a true value on the command line takes precedence
incrementBuildTag = true
}

// if we've specified the scheme or user, we also need the workspace
if requirements.contains(.workspace) || scheme != nil || user != nil {
if let workspace = options.workspace ?? defaultWorkspace {
Expand Down

0 comments on commit d28c3da

Please sign in to comment.