Move version and commit sha into main.go.

pull/1134/head
Ben Johnson 2014-11-17 17:34:47 -07:00
parent 0cc1818eaa
commit f5954ace5e
1 changed files with 7 additions and 1 deletions

View File

@ -28,6 +28,12 @@ const logo = `
+---------------------------------------------+
`
// These variables are populated via the Go linker.
var (
version string
commit string
)
func main() {
if err := start(); err != nil {
os.Exit(1)
@ -48,7 +54,7 @@ func start() error {
runtime.GOMAXPROCS(runtime.NumCPU())
flag.Parse()
v := fmt.Sprintf("InfluxDB v%s (git: %s)", version, gitSha)
v := fmt.Sprintf("InfluxDB v%s (git: %s)", version, commit)
if *showVersion {
fmt.Println(v)
return nil