remove duplicate Version/BuildTime from pilosa/server

use only the pilosa/cmd Version and BuildTime which are populated by the ldflags
in the Makefile
This commit is contained in:
Matt Jaffee 2017-03-09 11:39:11 -06:00
parent 8e0d64fe06
commit 72de534c8c
2 changed files with 2 additions and 15 deletions

View file

@ -25,8 +25,8 @@ It will load existing data from the configured
directory, and start listening client connections
on the configured port.`,
Run: func(cmd *cobra.Command, args []string) {
serve.Server.Handler.Version = server.Version
fmt.Fprintf(serve.Stderr, "Pilosa %s, build time %s\n", server.Version, server.BuildTime)
serve.Server.Handler.Version = Version
fmt.Fprintf(serve.Stderr, "Pilosa %s, build time %s\n", Version, BuildTime)
// Parse command line arguments.
if err := serve.SetupConfig(args); err != nil {

View file

@ -14,20 +14,7 @@ import (
"github.com/pilosa/pilosa"
)
// Version and BuildTime hold the version/build time information passed in at compile time.
var (
Version string
BuildTime string
)
func init() {
if Version == "" {
Version = "v0.0.0"
}
if BuildTime == "" {
BuildTime = "not recorded"
}
rand.Seed(time.Now().UTC().UnixNano())
}