Skip to content

Commit

Permalink
Merge pull request Carthage#2800 from blender/fix/build-carthage-swif…
Browse files Browse the repository at this point in the history
…t-5.1

Update code to be Swift 5.1 compatible
  • Loading branch information
ikesyo committed Jun 4, 2019
2 parents 2942fbc + 6375e02 commit 7cb0e6a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Source/carthage/Archive.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct ArchiveCommand: CommandProtocol {
let argumentUsage = "the names of the built frameworks to archive without any extension "
+ "(or blank to pick up the frameworks in the current project built by `--no-skip-current`)"

return curry(self.init)
return curry(Options.init)
<*> mode <| Option(
key: "output",
defaultValue: nil,
Expand Down
4 changes: 2 additions & 2 deletions Source/carthage/Build.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extension BuildOptions: OptionsProtocol {
var platformUsage = "the platforms to build for (one of 'all', 'macOS', 'iOS', 'watchOS', 'tvOS', or comma-separated values of the formers except for 'all')"
platformUsage += addendum

return curry(self.init)
return curry(BuildOptions.init)
<*> mode <| Option(key: "configuration", defaultValue: "Release", usage: "the Xcode configuration to build" + addendum)
<*> (mode <| Option<BuildPlatform>(key: "platform", defaultValue: .all, usage: platformUsage)).map { $0.platforms }
<*> mode <| Option<String?>(key: "toolchain", defaultValue: nil, usage: "the toolchain to build with")
Expand Down Expand Up @@ -52,7 +52,7 @@ public struct BuildCommand: CommandProtocol {
}

public static func evaluate(_ mode: CommandMode) -> Result<Options, CommandantError<CarthageError>> {
return curry(self.init)
return curry(Options.init)
<*> BuildOptions.evaluate(mode)
<*> mode <| Option(key: "skip-current", defaultValue: true, usage: "don't skip building the Carthage project (in addition to its dependencies)")
<*> ColorOptions.evaluate(mode)
Expand Down
2 changes: 1 addition & 1 deletion Source/carthage/Checkout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public struct CheckoutCommand: CommandProtocol {
}

public static func evaluate(_ mode: CommandMode, dependenciesUsage: String) -> Result<Options, CommandantError<CarthageError>> {
return curry(self.init)
return curry(Options.init)
<*> mode <| Option(key: "use-ssh", defaultValue: false, usage: "use SSH for downloading GitHub repositories")
<*> mode <| Option(key: "use-submodules", defaultValue: false, usage: "add dependencies as Git submodules")
<*> ColorOptions.evaluate(mode)
Expand Down
2 changes: 1 addition & 1 deletion Source/carthage/Fetch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public struct FetchCommand: CommandProtocol {
public let repositoryURL: GitURL

public static func evaluate(_ mode: CommandMode) -> Result<Options, CommandantError<CarthageError>> {
return curry(self.init)
return curry(Options.init)
<*> ColorOptions.evaluate(mode)
<*> mode <| Argument(usage: "the Git repository that should be cloned or fetched")
}
Expand Down
2 changes: 1 addition & 1 deletion Source/carthage/Formatting.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public struct ColorOptions: OptionsProtocol {
if let additionalUsage = additionalUsage {
usage += "\n" + additionalUsage
}
return curry(self.init)
return curry(ColorOptions.init)
<*> mode <| Option(
key: "color",
defaultValue: ColorArgument.auto,
Expand Down
2 changes: 1 addition & 1 deletion Source/carthage/Outdated.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public struct OutdatedCommand: CommandProtocol {
usage: "the directory containing the Carthage project"
)

return curry(self.init)
return curry(Options.init)
<*> mode <| Option(key: "use-ssh", defaultValue: false, usage: "use SSH for downloading GitHub repositories")
<*> mode <| Option(key: "verbose", defaultValue: false, usage: "include nested dependencies")
<*> mode <| Option(key: "xcode-warnings", defaultValue: false, usage: "output Xcode compatible warning messages")
Expand Down
2 changes: 1 addition & 1 deletion Source/carthage/Update.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public struct UpdateCommand: CommandProtocol {

let dependenciesUsage = "the dependency names to update, checkout and build"

return curry(self.init)
return curry(Options.init)
<*> mode <| Option(key: "checkout", defaultValue: true, usage: "skip the checking out of dependencies after updating")
<*> mode <| Option(key: "build", defaultValue: true, usage: buildDescription)
<*> mode <| Option(key: "verbose", defaultValue: false, usage: "print xcodebuild output inline (ignored if --no-build option is present)")
Expand Down

0 comments on commit 7cb0e6a

Please sign in to comment.