gitutil

package
v0.13.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Owner = "KusionStack"
	Repo  = "kusion"
)

Variables

View Source
var ErrEmptyGitTag = errors.New("empty tag")

Functions

func GetCurrentBranch

func GetCurrentBranch() (string, error)

func GetHeadHash

func GetHeadHash() (sha string, err error)

func GetHeadHashShort

func GetHeadHashShort() (sha string, err error)

func GetLatestTag

func GetLatestTag() (string, error)

func IsDirty

func IsDirty() (dirty bool, err error)

func IsHeadAtTag

func IsHeadAtTag(tag string) (bool, error)

Types

type Info added in v0.11.0

type Info struct {
	RemoteURL  string
	Commit     string
	CommitDate string
}

Info contains basic information of Git repository.

func Get added in v0.11.0

func Get(repoRoot string) (info Info)

Get returns the overall codebase version.

Jump to

Keyboard shortcuts

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