semver

package
v0.0.0-...-03ca8a1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BumpPatch = iota
	BumpMinor
	BumpMajor
)

Variables

This section is empty.

Functions

func CompareSemVersion

func CompareSemVersion(a SemVersion, b SemVersion) int

Types

type SemVersion

type SemVersion struct {
	Major      int
	Minor      int
	Patch      int
	PreRelease string
	Build      string
}

func Bump

func Bump(v SemVersion, level int) SemVersion

func NextPreReleaseLabelVersion

func NextPreReleaseLabelVersion(base SemVersion, label string, tags []Tag) SemVersion

func ParseSemVersion

func ParseSemVersion(value string) (SemVersion, bool, error)

func (SemVersion) IsPreRelease

func (v SemVersion) IsPreRelease() bool

func (SemVersion) String

func (v SemVersion) String(withVPrefix bool) string

type Tag

type Tag struct {
	Name       string
	CommitDate time.Time
	Version    SemVersion
	HasVPrefix bool
}

Tag represents a SemVer git tag together with the author date of its tagged commit. That date is used to decide which version window a change file falls into.

func LatestStable

func LatestStable(tags []Tag) (Tag, bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL