Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Port ¶
type Port interface {
// GetContainedTags returns the list of tags contained by the given branch.
GetContainedTags(branch string) ([]*Tag, error)
GuessGHRepo() (owner string, repo string)
GuessDefaultBranch() string
}
Port is the interface that must be implemented by git adapters.
type Tag ¶
type Tag struct {
Name string // tag name (without modification)
Time time.Time // commit time of the tag
Semver *semver.Version // semver version read from tag name (nil if the tag name is not in the expected format)
Prefix string // Prefix read before the semver version
}
Tag represents a git tag with its name, creation time and semantic version.
func NewTag ¶
NewTag creates a new Tag instance with the given name and date. It also parses the name to extract the semantic version of the tag: if the tag name has a prefix "v", the prefix will be removed before parsing the version, if the tag name is in the form foo/v1.2.3, the prefix part ("foo/") will be removed before parsing If the name is not in the expected format, the Semver field of the returned Tag will be nil.
Click to show internal directories.
Click to hide internal directories.