mirror of
https://github.com/thegeeklab/git-sv.git
synced 2024-11-25 07:30:38 +00:00
parent
2adacd62ef
commit
00c843df2d
@ -82,8 +82,8 @@ func NewGit(messageProcessor MessageProcessor, cfg TagConfig) *GitImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// LastTag get last tag, if no tag found, return empty.
|
// LastTag get last tag, if no tag found, return empty.
|
||||||
func (GitImpl) LastTag() string {
|
func (g GitImpl) LastTag() string {
|
||||||
cmd := exec.Command("git", "for-each-ref", "refs/tags", "--sort", "-creatordate", "--format", "%(refname:short)", "--count", "1")
|
cmd := exec.Command("git", "for-each-ref", "refs/tags/" + g.tagCfg.Filter, "--sort", "-creatordate", "--format", "%(refname:short)", "--count", "1")
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return ""
|
return ""
|
||||||
|
Loading…
Reference in New Issue
Block a user