Skip to content

Commit

Permalink
Add executable product
Browse files Browse the repository at this point in the history
  • Loading branch information
finnvoor committed Dec 21, 2023
1 parent 2770f93 commit 41d2532
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Finnvoor/SwiftTUI.git",
"state" : {
"revision" : "c4a996bf0d9252ab6d308a0c8b624b7ac21eef79",
"version" : "1.0.0"
"revision" : "0076c2ab58d5478a3c6cb11faa9068c92e8371ac",
"version" : "1.0.1"
}
},
{
Expand Down
3 changes: 2 additions & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import PackageDescription
let package = Package(
name: "xcc",
platforms: [.macOS(.v11)],
products: [.executable(name: "xcc", targets: ["xcc"])],
dependencies: [
.package(url: "https://github.com/apple/swift-argument-parser.git", from: "1.2.0"),
.package(url: "https://github.com/AvdLee/appstoreconnect-swift-sdk.git", from: "3.0.1"),
.package(url: "https://github.com/Finnvoor/SwiftTUI.git", from: "1.0.0")
.package(url: "https://github.com/Finnvoor/SwiftTUI.git", from: "1.0.1")
],
targets: [
.executableTarget(
Expand Down
6 changes: 3 additions & 3 deletions Sources/xcc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import SwiftTUI
let selectedProduct = if let product {
products.first(where: { $0.attributes?.name == product })
} else {
chooseFromList(products, prompt: "Select a product:")
CommandLine.chooseFromList(products, prompt: "Select a product:")
}
guard let selectedProduct else {
throw Error.couldNotFindProduct(availableProducts: products)
Expand All @@ -83,7 +83,7 @@ import SwiftTUI
let selectedWorkflow = if let workflow {
workflows.first(where: { $0.attributes?.name == workflow })
} else {
chooseFromList(workflows, prompt: "Select a workflow:")
CommandLine.chooseFromList(workflows, prompt: "Select a workflow:")
}
guard let selectedWorkflow else {
throw Error.couldNotFindWorkflow(availableWorkflows: workflows)
Expand All @@ -100,7 +100,7 @@ import SwiftTUI
let selectedGitReference = if let reference {
gitReferences.first(where: { $0.attributes?.name == reference })
} else {
chooseFromList(gitReferences, prompt: "Select a reference:")
CommandLine.chooseFromList(gitReferences, prompt: "Select a reference:")
}
guard let selectedGitReference else {
throw Error.couldNotFindReference(availableReferences: gitReferences)
Expand Down

0 comments on commit 41d2532

Please sign in to comment.