internal

package
v1.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckChangelogEntry

func CheckChangelogEntry(changelogPath, tag string) error

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 Confirm

func Confirm(prompt string) bool

func GitAdd

func GitAdd(dir string, paths ...string) error

func GitCheckoutMain

func GitCheckoutMain(dir string) error

func GitCommit

func GitCommit(dir, msg string) error

func GitIsClean

func GitIsClean(dir string) (bool, error)

func GitLatestTagWithMinor

func GitLatestTagWithMinor(dir, minor string) (string, error)

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 GitPull

func GitPull(dir string) error

func GitPush

func GitPush(dir string) error

func GitPushTags

func GitPushTags(dir string)

func GitRun

func GitRun(dir string, args ...string) error

GitRun runs a git command in dir, forwarding stdout/stderr to the terminal.

func GitTagExists

func GitTagExists(dir, tag string) (bool, error)

func GitTagSigned

func GitTagSigned(dir, tag string) error

func MinorVersion

func MinorVersion(tag string) string

MinorVersion extracts the "MAJOR.MINOR" prefix from a semver tag like "v1.7.3" → "1.7".

func ReplaceInFile

func ReplaceInFile(path, old, new string) (bool, error)

ReplaceInFile replaces all occurrences of old with new in the file at path. Returns whether the file was modified.

func ReplaceLineInFile

func ReplaceLineInFile(path string, transform func(line string) string) (bool, error)

ReplaceLineInFile applies a per-line transform and writes back if changed.

func ValidateTag

func ValidateTag(tag string) (semver string, err error)

Types

type Changelog

type Changelog struct {
	// contains filtered or unexported fields
}

func (*Changelog) Change

func (c *Changelog) Change(msg string)

func (*Changelog) Fail

func (c *Changelog) Fail(msg string)

func (*Changelog) HasErrors

func (c *Changelog) HasErrors() bool

func (*Changelog) PrintSummary

func (c *Changelog) PrintSummary(title string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL