Skip to content

Commit

Permalink
updated Runner
Browse files Browse the repository at this point in the history
  • Loading branch information
samdeane committed Sep 4, 2024
1 parent 2c26d33 commit 25ca3f1
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .swift-format
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"spaces": 2
},
"indentConditionalCompilationBlocks": true,
"indentSwitchCaseLabels": false,
"indentSwitchCaseLabels": true,
"lineBreakAroundMultilineExpressionChainComponents": false,
"lineBreakBeforeControlFlowKeywords": false,
"lineBreakBeforeEachArgument": false,
Expand Down
15 changes: 12 additions & 3 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
{
"originHash" : "ca7a99771d4d7141601704ce3004c64b6a89115f3b921a03ff7d4f6155cde63d",
"originHash" : "92178e92fabf6a8864901844cc48754f97a15bf30fdb9c05fdab9f08af800e57",
"pins" : [
{
"identity" : "chaosbytestreams",
"kind" : "remoteSourceControl",
"location" : "https://github.com/elegantchaos/ChaosByteStreams",
"state" : {
"revision" : "67dadbb9f94a2407a765e2eb6294fa22ac3fa736",
"version" : "1.0.1"
}
},
{
"identity" : "coercion",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -33,8 +42,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/elegantchaos/Runner.git",
"state" : {
"revision" : "4695591be15ed365323fb0b130bd21545f0aa91e",
"version" : "2.0.6"
"revision" : "31c1b80190630f7887eb1a0442c9618cbaad7d17",
"version" : "2.0.9"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let package = Package(
.package(url: "https://github.com/elegantchaos/Coercion.git", from: "1.1.2"),
.package(url: "https://github.com/elegantchaos/Files.git", from: "1.2.0"),
.package(url: "https://github.com/elegantchaos/Logger.git", branch: "v2-wip"),
.package(url: "https://github.com/elegantchaos/Runner.git", from: "2.0.6"),
.package(url: "https://github.com/elegantchaos/Runner.git", from: "2.0.9"),
.package(url: "https://github.com/elegantchaos/ChaosByteStreams", from: "1.0.0"),
.package(url: "https://github.com/elegantchaos/Versionator.git", from: "2.0.2"),
.package(url: "https://github.com/apple/swift-argument-parser", from: "1.5.0"),
Expand Down
4 changes: 2 additions & 2 deletions Sources/ReleaseTools/OptionParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ enum GeneralError: Error, CustomStringConvertible, Sendable {
case apiKeyAndIssuer
case userOrApiKey
case noDefaultScheme(_ platform: String)
case taggingFailed(_ result: Runner.RunningProcess)
case taggingFailed

public var description: String {
switch self {
case .infoUnreadable(let path): return "Couldn't read archive info.plist.\n\(path)"

case .missingWorkspace: return "The workspace was not specified, and could not be inferred."

case .taggingFailed(let result): return "Tagging failed.\n\(result)"
case .taggingFailed: return "Tagging failed."

case .noDefaultUser:
return """
Expand Down
4 changes: 2 additions & 2 deletions Sources/ReleaseTools/Runners/DittoRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class DittoRunner: Runner {
super.init(command: "ditto")
}

func run(_ arguments: [String]) throws -> RunningProcess {
func run(_ arguments: [String]) throws -> Session {
if parsed.showOutput {
parsed.log("ditto " + arguments.joined(separator: " "))
}
Expand All @@ -22,7 +22,7 @@ class DittoRunner: Runner {
return try run(arguments, stdoutMode: mode, stderrMode: mode)
}

func zip(_ url: URL, as zipURL: URL) throws -> RunningProcess {
func zip(_ url: URL, as zipURL: URL) throws -> Session {
parsed.log("Compressing \(url.lastPathComponent) to \(zipURL.path).")
return try run(["-c", "-k", "--sequesterRsrc", "--keepParent", url.path, zipURL.path])
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/ReleaseTools/Runners/XCRunRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class XCRunRunner: Runner {
super.init(command: "xcrun")
}

func run(_ arguments: [String]) throws -> RunningProcess {
func run(_ arguments: [String]) throws -> Session {
if parsed.showOutput {
parsed.log("xcrun " + arguments.joined(separator: " "))
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/ReleaseTools/Runners/XCodeBuildRunner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class XCodeBuildRunner: Runner {
return []
}

func run(_ arguments: [String]) throws -> RunningProcess {
func run(_ arguments: [String]) throws -> Session {
if parsed.showOutput {
parsed.log("xcodebuild " + arguments.joined(separator: " "))
}
Expand Down

0 comments on commit 25ca3f1

Please sign in to comment.