feat: Adds git client tests, restructures files.
This commit is contained in:
26
Sources/cli-version/Commands/BumpCommand.swift
Normal file
26
Sources/cli-version/Commands/BumpCommand.swift
Normal file
@@ -0,0 +1,26 @@
|
||||
import ArgumentParser
|
||||
import CliClient
|
||||
import Dependencies
|
||||
|
||||
struct BumpCommand: AsyncParsableCommand {
|
||||
|
||||
static let configuration = CommandConfiguration(
|
||||
commandName: "bump",
|
||||
abstract: "Bump version of a command-line tool."
|
||||
)
|
||||
|
||||
@OptionGroup var globals: GlobalOptions
|
||||
|
||||
@Flag(
|
||||
help: """
|
||||
The semvar bump option, this is ignored if the configuration is set to use a branch/commit sha strategy.
|
||||
"""
|
||||
)
|
||||
var bumpOption: CliClient.BumpOption = .patch
|
||||
|
||||
func run() async throws {
|
||||
try await globals.run(\.bump, args: bumpOption)
|
||||
}
|
||||
}
|
||||
|
||||
extension CliClient.BumpOption: EnumerableFlag {}
|
||||
Reference in New Issue
Block a user