Skip to content

Commit

Permalink
update runner, added some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
samdeane committed Sep 4, 2024
1 parent 5a4de20 commit 6999cea
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 28 deletions.
15 changes: 3 additions & 12 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
{
"originHash" : "0e13796fea18482095d6b7051cfd8bbbc4bb68f91fcdf7f0434eb18b18a1c116",
"originHash" : "ca7a99771d4d7141601704ce3004c64b6a89115f3b921a03ff7d4f6155cde63d",
"pins" : [
{
"identity" : "chaosbytestreams",
"kind" : "remoteSourceControl",
"location" : "https://github.com/elegantchaos/ChaosByteStreams",
"state" : {
"revision" : "bb2be531b8b3d1410ba6b40a860b6bf8060e8fa3",
"version" : "1.0.0"
}
},
{
"identity" : "coercion",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -42,8 +33,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/elegantchaos/Runner.git",
"state" : {
"revision" : "223dacb837a655634eb38900bd731bd05ee1ba42",
"version" : "2.0.5"
"revision" : "4695591be15ed365323fb0b130bd21545f0aa91e",
"version" : "2.0.6"
}
},
{
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.5"),
.package(url: "https://github.com/elegantchaos/Runner.git", from: "2.0.6"),
.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
8 changes: 6 additions & 2 deletions Sources/ReleaseTools/Commands/ArchiveCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import ArgumentParser
import Foundation
import Runner

struct WorkspaceSpec: Decodable {
let name: String
Expand Down Expand Up @@ -56,7 +57,7 @@ struct ArchiveCommand: AsyncParsableCommand {
let infoHeaderPath = "\(parsed.buildURL.path)/VersionInfo.h"
let build = try await UpdateBuildCommand.generateHeader(
parsed: parsed, header: infoHeaderPath, repo: parsed.rootURL.path)
parsed.log("Archiving scheme \(parsed.scheme).")
parsed.log("Archiving scheme \(parsed.scheme)...")

let xcode = XCodeBuildRunner(parsed: parsed)
var args = [
Expand All @@ -80,7 +81,10 @@ struct ArchiveCommand: AsyncParsableCommand {
break
}

let result = try xcode.run(args)
let outMode: Runner.Mode = parsed.verbose ? .forward : .capture
let errMode: Runner.Mode = parsed.verbose ? .both : .capture
let result = try xcode.run(args, stdoutMode: .capture, stderrMode: errMode)
try await result.throwIfFailed(ArchiveError.archiveFailed(await String(result.stderr)))
parsed.log("Archived scheme \(parsed.scheme).")
}
}
13 changes: 0 additions & 13 deletions Sources/ReleaseTools/RunnerExtras.swift

This file was deleted.

0 comments on commit 6999cea

Please sign in to comment.