Documentation
¶
Index ¶
- func CreateCommit(dir string, message string, files ...string) error
- func CreateTag(dir string, tag string, message string) error
- func LatestSemverTag(dir string, prefix ...string) (version.Semver, error)
- func ListSemverTags(dir string, prefix ...string) ([]version.Semver, error)
- func NamespacedTagString(prefix string, v version.Semver) string
- func Push(dir string, tags ...string) error
- func RemoteOwnerRepo(dir string) (owner, repo string, err error)
- type CommitLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateCommit ¶
CreateCommit stages the given files and creates a commit.
func LatestSemverTag ¶
LatestSemverTag returns the highest semver tag, or 0.0.0 if none exist. An optional prefix filters tags (e.g., "cli" matches "cli/v1.0.0").
func ListSemverTags ¶
ListSemverTags returns all tags that parse as valid semver, sorted descending. An optional prefix filters tags (e.g., "cli" matches "cli/v1.0.0").
func NamespacedTagString ¶ added in v0.3.0
NamespacedTagString returns a tag string with the given prefix. e.g., NamespacedTagString("cli", v) returns "cli/v1.2.0". If prefix is empty, returns the standard "v1.2.0" format.
func Push ¶
Push pushes the current branch and any specified tags to the remote in a single command to avoid partial-failure states.
func RemoteOwnerRepo ¶ added in v0.0.2
RemoteOwnerRepo parses the origin remote URL to extract the repository owner and name. It supports both HTTPS and SSH URL formats.
Types ¶
type CommitLog ¶
CommitLog represents a single git commit.
func LogBetween ¶
LogBetween returns commits between fromRef and toRef (exclusive fromRef). If fromRef is empty, returns all commits up to toRef. An optional pathFilter restricts results to commits touching files under that path.