Documentation
¶
Overview ¶
Package bump provides functionality for semantic versioning and git tagging.
Index ¶
- func CreateTag(tag string) error
- func GetDefaultPushPreference(repoPath string) (bool, bool, error)
- func GetLatestTag(tagRefs storer.ReferenceIter) (string, error)
- func GetNextTag(currentTag, bumpType, suffix string) (string, error)
- func NewGitInfo(path string) ([]string, error)
- func ParseTagVersion(tag string) (*tagVersion, bool)
- func PushTag() error
- func SetDefaultPushPreference(repoPath string, value bool) error
- type GitLock
- type MockReferenceIter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTag ¶ added in v1.6.0
CreateTag creates a new git tag with the given tag. Uses concurrency protection to prevent concurrent git operations.
func GetDefaultPushPreference ¶ added in v1.6.0
GetDefaultPushPreference reads the bump defaultPush value from .git/config in the given repo path. Returns (value, isSet, error) where isSet indicates if the preference was explicitly configured.
func GetLatestTag ¶
func GetLatestTag(tagRefs storer.ReferenceIter) (string, error)
GetLatestTag returns the latest semantic version tag in the given git tags.
func GetNextTag ¶
GetNextTag returns the next semantic version tag based on the given current tag and bump type.
func NewGitInfo ¶
NewGitInfo returns the semantic versions of all git tags in the repository at the given path.
func ParseTagVersion ¶
ParseTagVersion parses a git tag into a semantic version.
Types ¶
type GitLock ¶ added in v1.7.1
type GitLock struct {
// contains filtered or unexported fields
}
GitLock represents a file-based lock for git operations
type MockReferenceIter ¶
type MockReferenceIter struct {
// contains filtered or unexported fields
}
func NewMockReferenceIter ¶
func NewMockReferenceIter(refs []plumbing.Reference) *MockReferenceIter
func (*MockReferenceIter) Close ¶
func (m *MockReferenceIter) Close()