Documentation
¶
Overview ¶
Package git provides git operations for tags and repository state.
Index ¶
- func CreateTag(dir string, module string, version string) error
- func CreateTags(dir string, tags []Tag) error
- func FormatTag(module string, version string) string
- func GetAllTags(dir string) (map[string][]string, error)
- func GetChangedFiles(dir string, sinceRef string) ([]string, error)
- func GetLatestVersions(dir string) (map[string]string, error)
- func HasUncommittedChanges(dir string) (bool, error)
- func ParseTag(tagName string) (module string, version string, ok bool)
- func PushTags(dir string, tags []Tag, remote string) error
- type Tag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTag ¶
CreateTag creates a git tag for a module version. For submodules, uses format "module/version". For root, uses format "version".
func CreateTags ¶
CreateTags creates multiple git tags atomically.
func FormatTag ¶
FormatTag creates a tag name from module and version. For root module (empty module name), returns just the version. For submodules, returns "module/version".
func GetAllTags ¶
GetAllTags returns all tags grouped by module. Returns a map of module short name -> list of versions.
func GetChangedFiles ¶
GetChangedFiles returns files changed since a given ref (branch/tag).
func GetLatestVersions ¶
GetLatestVersions returns the latest version for each module. Returns a map of module short name -> version (e.g., "xkafka" -> "v0.10.0"). Root module uses empty string as key.
func HasUncommittedChanges ¶
HasUncommittedChanges returns true if there are uncommitted changes.