diff --git a/cmd/make.go b/cmd/make.go index 03fd9b2cf..2886a84bf 100644 --- a/cmd/make.go +++ b/cmd/make.go @@ -246,11 +246,17 @@ func getBuildDateTime() string { } func getBuildVer() string { - stdout, err := execCommand("git", "describe", "--tags") + latestTagCommit, err := execCommand("git", "rev-list", "--tags", "--max-count=1") if err != nil { return "" } - return trimRight(stdout) + + stdout, err := execCommand("git", "describe", "--tags", trimRight(latestTagCommit)) + if err != nil { + return "" + } + + return fmt.Sprintf("%s devel", trimRight(stdout)) } func getGopBuildFlags() string {