Documentation ¶
Index ¶
- Constants
- Variables
- func BranchExists(repo *gogit.Repository, branchName string) (bool, error)
- func CreateTag(repo *gogit.Repository, version, prefix string, dryRun bool) error
- func CreateTagWithMessage(repo *gogit.Repository, version, prefix, message string, ...) error
- func PushTag(r *gogit.Repository, version, prefix, remote string, dryRun bool, ...) error
- func TagExists(r *gogit.Repository, tag string) (bool, error)
- type CurrentVersionFunc
- type GetOptions
- type PushTagFunc
- type SemverRef
- func CurrentVersion(repo *gogit.Repository, prefix string, preRelease release.PreReleaseFunc, ...) (SemverRef, error)
- func LatestRef(repo *gogit.Repository, prefix string) (SemverRef, error)
- func ListRefs(repo *gogit.Repository, prefix string, direction SortDirection, ...) ([]SemverRef, error)
- func NearestTag(repo *gogit.Repository, prefix string) (SemverRef, error)
- func PreviousRef(repo *gogit.Repository, prefix string) (SemverRef, error)
- type SemverRefColl
- type SortDirection
Constants ¶
View Source
const ( ASC = SortDirection(asc) DESC = SortDirection(desc) )
Variables ¶
View Source
var ( ErrNoTagFound = errors.New("no tag found") ErrOneTagFound = errors.New("one tag found") ErrInvalidSortDirection = errors.New("invalid sort direction") ErrPreReleaseVersion = errors.New("invalid preReleaseVersion") ErrUndefinedAuth = errors.New("no auth has been configured, GITHUB_TOKEN or SSH_AUTH_SOCK must be set") )
View Source
var EmptyRef = SemverRef{}
EmptyRef empty constructor nolint:gochecknoglobals
View Source
var EmptyRefList []SemverRef
EmptyRefList empty constructor nolint:gochecknoglobals
Functions ¶
func BranchExists ¶
func BranchExists(repo *gogit.Repository, branchName string) (bool, error)
func CreateTagWithMessage ¶
Types ¶
type CurrentVersionFunc ¶
type CurrentVersionFunc func(repo *gogit.Repository, prefix string, preRelease release.PreReleaseFunc, options GetOptions) (SemverRef, error)
type GetOptions ¶ added in v0.30.0
type GetOptions struct {
NearestRelease bool
}
type PushTagFunc ¶
type SemverRef ¶
func CurrentVersion ¶
func CurrentVersion(repo *gogit.Repository, prefix string, preRelease release.PreReleaseFunc, options GetOptions) (SemverRef, error)
func ListRefs ¶
func ListRefs(repo *gogit.Repository, prefix string, direction SortDirection, maxListSize int) ([]SemverRef, error)
func NearestTag ¶ added in v0.30.0
func NearestTag(repo *gogit.Repository, prefix string) (SemverRef, error)
func PreviousRef ¶
func PreviousRef(repo *gogit.Repository, prefix string) (SemverRef, error)
type SemverRefColl ¶
type SemverRefColl []SemverRef
SemverRefColl is a collection of Version instances and implements the sort interface. See the sort package for more details. https://golang.org/pkg/sort/
func (SemverRefColl) Len ¶
func (c SemverRefColl) Len() int
Len returns the length of a collection. The number of Version instances on the slice.
func (SemverRefColl) Less ¶
func (c SemverRefColl) Less(i, j int) bool
Less is needed for the sort interface to compare two Version objects on the slice. If checks if one is less than the other.
func (SemverRefColl) Swap ¶
func (c SemverRefColl) Swap(i, j int)
Swap is needed for the sort interface to replace the Version objects at two different positions in the slice.
type SortDirection ¶
type SortDirection string
func ParseSortDirection ¶
func ParseSortDirection(str string) (SortDirection, error)
Click to show internal directories.
Click to hide internal directories.