gitversions

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FullVerPattern matches only against full versions, no pre-releases.
	FullVerPattern string = `\d+\.\d+\.\d+$`
)

Variables

View Source
var (
	ErrNotDirty = errors.New("repository is clean")
)
View Source
var (
	FullVerRegexp = regexp.MustCompile(FullVerPattern)
)

Functions

func LastModificationTime

func LastModificationTime(wt *git.Worktree, st git.Status) (*time.Time, error)

Types

type VString

type VString struct {
	Guide   gitrepo.Guide
	Prefix  string
	Version semver.Version
}

func Latest

func Latest(repo *git.Repository, ref *plumbing.Reference) (*VString, error)

func (VString) String

func (v VString) String() string

type VersionTag

type VersionTag struct {
	Original string
	Prefix   string
	Version  semver.Version
}

func NewVersionTag

func NewVersionTag(original string) (vt *VersionTag)

type VersionTags

type VersionTags []*VersionTag

func FilterVersionTags

func FilterVersionTags(raw []string) (out VersionTags)

func (VersionTags) Len

func (s VersionTags) Len() int

func (VersionTags) Less

func (s VersionTags) Less(i, j int) bool

func (VersionTags) Swap

func (s VersionTags) Swap(i, j int)

Jump to

Keyboard shortcuts

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