Documentation
¶
Index ¶
- func CheckChangelogEntry(changelogPath, tag string) error
- func Confirm(prompt string) bool
- func GitAdd(dir string, paths ...string) error
- func GitCheckoutMain(dir string) error
- func GitCommit(dir, msg string) error
- func GitIsClean(dir string) (bool, error)
- func GitLatestTagWithMinor(dir, minor string) (string, error)
- func GitPull(dir string) error
- func GitPush(dir string) error
- func GitPushTags(dir string)
- func GitRun(dir string, args ...string) error
- func GitTagExists(dir, tag string) (bool, error)
- func GitTagSigned(dir, tag string) error
- func MinorVersion(tag string) string
- func ReplaceInFile(path, old, new string) (bool, error)
- func ReplaceLineInFile(path string, transform func(line string) string) (bool, error)
- func ValidateTag(tag string) (semver string, err error)
- type Changelog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckChangelogEntry ¶
CheckChangelogEntry returns an error if the given tag has no entry in the CHANGELOG.md found at changelogPath. It looks for a line starting with "## [<tag>]" (case-insensitive bracket match).
func GitCheckoutMain ¶
func GitIsClean ¶
func GitLatestTagWithMinor ¶
GitLatestTagWithMinor returns the most recent tag in dir whose minor version matches the given minor string (e.g. "1.7"). Returns "" if none found.
func GitPushTags ¶
func GitPushTags(dir string)
func GitTagExists ¶
func GitTagSigned ¶
func MinorVersion ¶
MinorVersion extracts the "MAJOR.MINOR" prefix from a semver tag like "v1.7.3" → "1.7".
func ReplaceInFile ¶
ReplaceInFile replaces all occurrences of old with new in the file at path. Returns whether the file was modified.
func ReplaceLineInFile ¶
ReplaceLineInFile applies a per-line transform and writes back if changed.
func ValidateTag ¶
Types ¶
type Changelog ¶
type Changelog struct {
// contains filtered or unexported fields
}
func (*Changelog) PrintSummary ¶
Click to show internal directories.
Click to hide internal directories.