semver

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommitMessageRegex

func CommitMessageRegex() *regexp.Regexp

func TagParseRegex

func TagParseRegex() *regexp.Regexp

Types

type BumpType

type BumpType uint8
const (
	NoBump BumpType = iota
	PatchBump
	MinorBump
	MajorBump
)

type Change

type Change struct {
	Type        string
	Scope       string
	Description string
	Body        string
	Bump        BumpType
}

func ChangeFromCommitMessage

func ChangeFromCommitMessage(message string) *Change

type Version

type Version struct {
	Major uint64
	Minor uint64
	Patch uint64
}

func NewVersion

func NewVersion(major, minor, patch uint64) *Version

func ParseVersion

func ParseVersion(version string) (*Version, error)

func (*Version) Bump

func (v *Version) Bump(bump BumpType) *Version

Bump edits the version in place and returns a pointer to itself.

func (*Version) Compare

func (v *Version) Compare(other *Version) int

func (*Version) Equals

func (v *Version) Equals(other *Version) bool

func (*Version) String

func (v *Version) String() string

Jump to

Keyboard shortcuts

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