Documentation
¶
Index ¶
Constants ¶
View Source
const ( Owner = "KusionStack" Repo = "kusion" )
Variables ¶
View Source
var ErrEmptyGitTag = errors.New("empty tag")
Functions ¶
func GetCurrentBranch ¶
func GetHeadHash ¶
func GetHeadHashShort ¶
func GetLatestTag ¶
func IsHeadAtTag ¶
Types ¶
type GitInfo ¶
type GitInfo struct { CurrentBranch string `json:"currentBranch,omitempty" yaml:"currentBranch,omitempty"` // Such as "master" HeadCommit string `json:"headCommit,omitempty" yaml:"headCommit,omitempty"` // Such as "3836f8770ab8f488356b2129f42f2ae5c1134bb0" TreeState string `json:"treeState,omitempty" yaml:"treeState,omitempty"` // Such as "clean", "dirty" LatestTag string `json:"latestTag,omitempty" yaml:"latestTag,omitempty"` // Such as "v1.2.3" }
GitInfo contains git information.
func NewGitInfoFrom ¶
NewGitInfoFrom returns git info from workDir, or nil if failed.
Click to show internal directories.
Click to hide internal directories.