git

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: MPL-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

View Source
const (
	BranchMain = "main"
	BranchNext = "next"
)

Variables

View Source
var (
	ErrRemoteURLNotFound = fmt.Errorf("remote URL not found")
	ErrGitRepoNil        = fmt.Errorf("git repository is nil")
	ErrBranchesNil       = fmt.Errorf("branches are nil")
	ErrCurrBrancheNil    = fmt.Errorf("current branch is nil")
	ErrGitTreeNil        = fmt.Errorf("git tree is nil")
)
View Source
var ErrBranchNameInvalid = errors.New("branch name not in valid set")

Functions

func NextTag added in v0.6.0

func NextTag(
	branchName string,
	repo *git.Repository,
) (string, error)

Types

type Service

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

func NewGitService

func NewGitService() *Service

func NewGitServiceWithRepo

func NewGitServiceWithRepo(repo *git.Repository) *Service

func (*Service) GetGitBasePath

func (g *Service) GetGitBasePath() (string, error)

func (*Service) GetGitBasePathWithRepo

func (g *Service) GetGitBasePathWithRepo(repo *git.Repository) (string, error)

func (*Service) GetGitBranches

func (g *Service) GetGitBranches() (*storer.ReferenceIter, error)

func (*Service) GetGitCurrentBranchName

func (g *Service) GetGitCurrentBranchName() (string, error)

func (*Service) GetGitHead

func (g *Service) GetGitHead() (*plumbing.Reference, error)

func (*Service) GetGitHeadTree

func (g *Service) GetGitHeadTree() (*object.Tree, error)

func (*Service) GetGitRepo

func (g *Service) GetGitRepo() (*git.Repository, error)

func (*Service) GetRemoteGitRepo

func (g *Service) GetRemoteGitRepo(remoteURL string) (*git.Repository, error)

func (*Service) PushTag

func (g *Service) PushTag() error

func (*Service) TagSemver

func (g *Service) TagSemver() (bool, error)

Jump to

Keyboard shortcuts

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