Files
swift-bump-version/Sources/bump-version/Commands/BumpCommand.swift
Michael Housh 322327d6d7
All checks were successful
CI / Ubuntu (push) Successful in 2m55s
feat: Renaming to bump-version
2024-12-24 16:39:38 -05:00

27 lines
611 B
Swift

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 {}