From 25ca3f14b1190bdebb14c9013ee14470dd67cdee Mon Sep 17 00:00:00 2001 From: Sam Deane Date: Wed, 4 Sep 2024 22:22:20 +0100 Subject: [PATCH] updated Runner --- .swift-format | 2 +- Package.resolved | 15 ++++++++++++--- Package.swift | 2 +- Sources/ReleaseTools/OptionParser.swift | 4 ++-- Sources/ReleaseTools/Runners/DittoRunner.swift | 4 ++-- Sources/ReleaseTools/Runners/XCRunRunner.swift | 2 +- .../ReleaseTools/Runners/XCodeBuildRunner.swift | 2 +- 7 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.swift-format b/.swift-format index fa67204..36a7215 100644 --- a/.swift-format +++ b/.swift-format @@ -6,7 +6,7 @@ "spaces": 2 }, "indentConditionalCompilationBlocks": true, - "indentSwitchCaseLabels": false, + "indentSwitchCaseLabels": true, "lineBreakAroundMultilineExpressionChainComponents": false, "lineBreakBeforeControlFlowKeywords": false, "lineBreakBeforeEachArgument": false, diff --git a/Package.resolved b/Package.resolved index 0217874..5ffdde4 100644 --- a/Package.resolved +++ b/Package.resolved @@ -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", @@ -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" } }, { diff --git a/Package.swift b/Package.swift index df38339..5bb4e79 100644 --- a/Package.swift +++ b/Package.swift @@ -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"), diff --git a/Sources/ReleaseTools/OptionParser.swift b/Sources/ReleaseTools/OptionParser.swift index 2341529..ee1d4ec 100644 --- a/Sources/ReleaseTools/OptionParser.swift +++ b/Sources/ReleaseTools/OptionParser.swift @@ -15,7 +15,7 @@ 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 { @@ -23,7 +23,7 @@ enum GeneralError: Error, CustomStringConvertible, Sendable { 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 """ diff --git a/Sources/ReleaseTools/Runners/DittoRunner.swift b/Sources/ReleaseTools/Runners/DittoRunner.swift index 8022526..2fe7ff4 100644 --- a/Sources/ReleaseTools/Runners/DittoRunner.swift +++ b/Sources/ReleaseTools/Runners/DittoRunner.swift @@ -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: " ")) } @@ -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]) } diff --git a/Sources/ReleaseTools/Runners/XCRunRunner.swift b/Sources/ReleaseTools/Runners/XCRunRunner.swift index 39a0556..3acaae3 100644 --- a/Sources/ReleaseTools/Runners/XCRunRunner.swift +++ b/Sources/ReleaseTools/Runners/XCRunRunner.swift @@ -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: " ")) } diff --git a/Sources/ReleaseTools/Runners/XCodeBuildRunner.swift b/Sources/ReleaseTools/Runners/XCodeBuildRunner.swift index 25d4644..74a84e3 100644 --- a/Sources/ReleaseTools/Runners/XCodeBuildRunner.swift +++ b/Sources/ReleaseTools/Runners/XCodeBuildRunner.swift @@ -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: " ")) }