May I ask how to modify the version in the dashboard?

Viewed 61

Sorry for my English. When I run the binary file obtained through compiling the source code, I notice that the version in the dashboard is always 0.0.0. Could you kindly guide me on how to modify it to a specific version?

1 Answers

You can use make build command to build binary. BTW, It works by using -X github.com/apache/incubator-answer/cmd.Version=$(VERSION) to specify the version number.

➜ answer (main) ✗ pwd       
/xxxx/answer/cmd/answer
➜ answer (main) ✗ go build -ldflags "-X github.com/apache/incubator-answer/cmd.Version=v1.2.5" .
➜ answer (main) ✗ ./answer -v
answer version v1.2.5