gitutil

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func GetHeadHash

func GetHeadHash() (sha string, err error)

func GetHeadHashShort

func GetHeadHashShort() (sha string, err error)

func GetLatestTag

func GetLatestTag() (string, error)

func GetLatestTagFromLocal

func GetLatestTagFromLocal() (tag string, err error)

func GetLatestTagFromRemote

func GetLatestTagFromRemote() (tag string, err error)

get latest tag from remote, the fitting git clone depth is 1

func GetRemoteURL added in v0.2.9

func GetRemoteURL() (string, error)

get remote url

func GetTagCommitSha

func GetTagCommitSha(tag string) (sha string, err error)

func GetTagCommitShaFromLocal

func GetTagCommitShaFromLocal(tag string) (sha string, err error)

func GetTagCommitShaFromRemote

func GetTagCommitShaFromRemote(_ string) (string, error)

get tag commit sha from remote, the fitting git clone depth is 1

func GetTagList

func GetTagList() (tags []string, err error)

func GetTagListFromRemote

func GetTagListFromRemote(remoteURL string, reverse bool) (tags []string, err error)

func IsDirty

func IsDirty() (dirty bool, err error)

func IsHeadAtTag

func IsHeadAtTag(tag string) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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