Skip to content

Commit

Permalink
chore: use the latest tag version and append it with "devel" to signi…
Browse files Browse the repository at this point in the history
…fy the binary installation via source code
  • Loading branch information
CarlJi committed Dec 12, 2023
1 parent 4cf8b5e commit fce5771
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 fce5771

Please sign in to comment.