git

package
v0.2.31 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BumpMinorVersion added in v0.2.30

func BumpMinorVersion(ctx context.Context, tag string) (string, error)

BumpMinorVersion increments the minor version of a semver tag (resets patch to 0)

func BumpPatchVersion

func BumpPatchVersion(ctx context.Context, tag string) (string, error)

BumpPatchVersion increments the patch version of a semver tag

func CommitAndRelease

func CommitAndRelease(ctx context.Context, changelogEntry string, bump VersionBump) error

CommitAndRelease performs the full git workflow: 1. git add -A 2. Read CHANGELOG.md and add entry 3. Bump version (patch or minor) 4. git commit 5. git tag 6. git push + push tag

func CommitCompletedFile added in v0.2.27

func CommitCompletedFile(ctx context.Context, path string) error

CommitCompletedFile stages and commits a completed prompt file. This is called after MoveToCompleted() to ensure the moved file is committed. Does nothing if the file is already staged or committed.

func GetNextVersion added in v0.2.0

func GetNextVersion(ctx context.Context, bump VersionBump) (string, error)

GetNextVersion determines the next version based on the bump type.

Types

type Releaser added in v0.2.26

type Releaser interface {
	GetNextVersion(ctx context.Context, bump VersionBump) (string, error)
	CommitAndRelease(ctx context.Context, title string, bump VersionBump) error
	CommitCompletedFile(ctx context.Context, path string) error
	CommitOnly(ctx context.Context, message string) error
	HasChangelog(ctx context.Context) bool
}

Releaser handles git commit, tag, and push operations.

func NewReleaser added in v0.2.26

func NewReleaser() Releaser

NewReleaser creates a new Releaser.

type VersionBump added in v0.2.30

type VersionBump int

VersionBump specifies the type of version bump to perform.

const (
	// PatchBump increments the patch version (vX.Y.Z -> vX.Y.Z+1)
	PatchBump VersionBump = iota
	// MinorBump increments the minor version (vX.Y.Z -> vX.Y+1.0)
	MinorBump
)

Jump to

Keyboard shortcuts

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