feat: Updates logging configuration.
This commit is contained in:
@@ -4,8 +4,10 @@ import Foundation
|
||||
import ShellClient
|
||||
|
||||
struct BuildCommand: AsyncParsableCommand {
|
||||
static let commandName = "build"
|
||||
|
||||
static let configuration: CommandConfiguration = .init(
|
||||
commandName: "build",
|
||||
commandName: Self.commandName,
|
||||
abstract: "Used for the build with version plugin.",
|
||||
discussion: "This should generally not be interacted with directly, outside of the build plugin.",
|
||||
shouldDisplay: false
|
||||
@@ -14,6 +16,6 @@ struct BuildCommand: AsyncParsableCommand {
|
||||
@OptionGroup var globals: GlobalOptions
|
||||
|
||||
func run() async throws {
|
||||
try await globals.run(\.build)
|
||||
try await globals.run(\.build, command: Self.commandName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,8 +4,10 @@ import Dependencies
|
||||
|
||||
struct BumpCommand: AsyncParsableCommand {
|
||||
|
||||
static let commandName = "bump"
|
||||
|
||||
static let configuration = CommandConfiguration(
|
||||
commandName: "bump",
|
||||
commandName: Self.commandName,
|
||||
abstract: "Bump version of a command-line tool."
|
||||
)
|
||||
|
||||
@@ -19,7 +21,7 @@ struct BumpCommand: AsyncParsableCommand {
|
||||
var bumpOption: CliClient.BumpOption = .patch
|
||||
|
||||
func run() async throws {
|
||||
try await globals.run(\.bump, args: bumpOption)
|
||||
try await globals.run(\.bump, command: Self.commandName, args: bumpOption)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,8 +5,10 @@ import Foundation
|
||||
import ShellClient
|
||||
|
||||
struct GenerateCommand: AsyncParsableCommand {
|
||||
static let commandName = "generate"
|
||||
|
||||
static let configuration: CommandConfiguration = .init(
|
||||
commandName: "generate",
|
||||
commandName: Self.commandName,
|
||||
abstract: "Generates a version file in a command line tool that can be set via the git tag or git sha.",
|
||||
discussion: "This command can be interacted with directly, outside of the plugin usage context."
|
||||
)
|
||||
@@ -14,6 +16,6 @@ struct GenerateCommand: AsyncParsableCommand {
|
||||
@OptionGroup var globals: GlobalOptions
|
||||
|
||||
func run() async throws {
|
||||
try await globals.run(\.generate)
|
||||
try await globals.run(\.generate, command: Self.commandName)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,8 +18,10 @@ struct UtilsCommand: AsyncParsableCommand {
|
||||
|
||||
extension UtilsCommand {
|
||||
struct DumpConfig: AsyncParsableCommand {
|
||||
static let commandName = "dump-config"
|
||||
|
||||
static let configuration = CommandConfiguration(
|
||||
commandName: "dump-config",
|
||||
commandName: Self.commandName,
|
||||
abstract: "Show the parsed configuration.",
|
||||
aliases: ["dc"]
|
||||
)
|
||||
@@ -27,7 +29,7 @@ extension UtilsCommand {
|
||||
@OptionGroup var globals: GlobalOptions
|
||||
|
||||
func run() async throws {
|
||||
let configuration = try await globals.runClient(\.parsedConfiguration)
|
||||
let configuration = try await globals.runClient(\.parsedConfiguration, command: Self.commandName)
|
||||
customDump(configuration)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user