diff options
Diffstat (limited to 'lib/git/git.go')
| -rw-r--r-- | lib/git/git.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/git/git.go b/lib/git/git.go index c68fce02..ff29d341 100644 --- a/lib/git/git.go +++ b/lib/git/git.go @@ -267,6 +267,9 @@ func LatestTag(repoDir string) (tag string, err error) { } out := string(bytes.TrimSpace(bout)) + if len(out) == 0 { + return + } cmd = exec.Command("git") cmd.Args = append(cmd.Args, "describe", "--tags", "--abbrev=0", out) @@ -294,7 +297,7 @@ func LatestTag(repoDir string) (tag string, err error) { // func LatestVersion(repoDir string) (version string, err error) { version, err = LatestTag(repoDir) - if err == nil { + if err == nil && len(version) > 0 { return } |
