Files
swift-bump-version/Sources/bump-version/Commands/GenerateCommand.swift
Michael Housh a0f8611a76
All checks were successful
CI / Ubuntu (push) Successful in 2m52s
feat: Working on command-line documentation.
2024-12-26 12:13:42 -05:00

26 lines
706 B
Swift

import ArgumentParser
import CliClient
import CliDoc
import Dependencies
import Foundation
import ShellClient
struct GenerateCommand: AsyncParsableCommand {
static let commandName = "generate"
static let configuration: CommandConfiguration = .init(
commandName: Self.commandName,
abstract: Abstract.default("Generates a version file in your project.").render(),
usage: Usage.default(commandName: Self.commandName),
discussion: Discussion {
"This command can be interacted with directly, outside of the plugin usage context."
}
)
@OptionGroup var globals: GlobalOptions
func run() async throws {
try await globals.run(\.generate, command: Self.commandName)
}
}