Skip to content

Commit

Permalink
Merge pull request #1574 from CarlJi/fix_version
Browse files Browse the repository at this point in the history
chore: use the latest tag version and append it with "devel" to signify the binary installation via source code
  • Loading branch information
xushiwei committed Dec 14, 2023
2 parents 0e9a800 + fce5771 commit 8d774f8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmd/make.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 8d774f8

Please sign in to comment.