Documentation ¶
Overview ¶
Package gitutil provides convenient interfaces for operating git.
Dependency: git needs to be installed locally
Index ¶
- func GetHeadHash() (sha string, err error)
- func GetHeadHashShort() (sha string, err error)
- func GetLatestTag() (string, error)
- func GetLatestTagFromLocal() (tag string, err error)
- func GetLatestTagFromRemote() (tag string, err error)
- func GetRemoteUrl() (string, error)
- func GetTagCommitSha(tag string) (sha string, err error)
- func GetTagCommitShaFromLocal(tag string) (sha string, err error)
- func GetTagCommitShaFromRemote(tag string) (string, error)
- func GetTagList() (tags []string, err error)
- func IsDirty() (dirty bool, err error)
- func IsHeadAtTag(tag string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHeadHash ¶
func GetHeadHashShort ¶
func GetLatestTag ¶
func GetLatestTagFromLocal ¶ added in v0.2.1
func GetLatestTagFromRemote ¶ added in v0.2.1
get latest tag from remote, the fitting git clone depth is 1
func GetTagCommitSha ¶
func GetTagCommitShaFromLocal ¶ added in v0.2.1
func GetTagCommitShaFromRemote ¶ added in v0.2.1
get tag commit sha from remote, the fitting git clone depth is 1
func GetTagList ¶
func IsHeadAtTag ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.