Documentation
¶
Index ¶
- func ContainsPath(modules []Module, path string) bool
- func FormatTag(modulePath string, version *semver.Version) string
- func GroupTagsByModule(tags []TagInfo) map[string][]TagInfo
- func NextVersion(current *semver.Version, bump string) (*semver.Version, error)
- func SortVersionsAsc(tags []TagInfo)
- func SortVersionsDesc(tags []TagInfo)
- type Module
- type TagInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsPath ¶
ContainsPath reports whether any module in the slice has the given path.
func GroupTagsByModule ¶
GroupTagsByModule groups parsed tag infos by module path.
func NextVersion ¶
NextVersion computes the next version given a bump type.
func SortVersionsAsc ¶
func SortVersionsAsc(tags []TagInfo)
SortVersionsAsc sorts tag infos by version ascending (oldest first).
func SortVersionsDesc ¶
func SortVersionsDesc(tags []TagInfo)
SortVersionsDesc sorts tag infos by version descending (newest first).
Types ¶
type Module ¶
type Module struct {
Path string // Relative path within the repo, e.g. "hetzner/server"
}
Module represents a discovered terraform module.
type TagInfo ¶
TagInfo holds parsed information from a git tag.
func FilterTagsForModule ¶
FilterTagsForModule filters parsed tags to only those matching a module path.
func LatestVersion ¶
LatestVersion returns the latest version from a list of tag infos. Returns nil if the list is empty.
func ParseAllTags ¶
ParseAllTags parses a list of raw tag strings, skipping those that don't match the expected format.