Add TUI add and preview commands
Use charmbracelet/huh for an interactive add flow. Add a preview subcommand to enter/exit per-project pre-release tags. Move stamp.toml into .stamp/ and add ConfigPath helper. Prefer --snapshot then project PreTag when computing versions and promote bumps to pre-release when appropriate. Export CurrentVersion and add required TUI deps to go.mod.
This commit is contained in:
@@ -9,6 +9,12 @@ import (
|
||||
"git.thokra.dev/thokra/stamp/internal/changeset"
|
||||
)
|
||||
|
||||
// CurrentVersion parses a version string and returns the semver object.
|
||||
// It is exported so callers can inspect pre-release state without re-importing the semver library.
|
||||
func CurrentVersion(version string) (*goSemver.Version, error) {
|
||||
return goSemver.NewVersion(version)
|
||||
}
|
||||
|
||||
// Bump computes the next version given the current version string and a bump type.
|
||||
// preID is the pre-release identifier (e.g. "alpha", "beta", "rc") used for pre-* bumps.
|
||||
func Bump(current string, bump changeset.BumpType, preID string) (string, error) {
|
||||
|
||||
Reference in New Issue
Block a user