diff --git a/cmd/pilosa/main.go b/cmd/pilosa/main.go index 24d2a9fec..4d45d192a 100644 --- a/cmd/pilosa/main.go +++ b/cmd/pilosa/main.go @@ -17,12 +17,12 @@ import ( "github.com/pilosa/pilosa" ) -// Build holds the build information passed in at compile time. -var Build string +// Version holds the version information passed in at compile time. +var Version string func init() { - if Build == "" { - Build = "v0.0.0" + if Version == "" { + Version = "0.0.0" } rand.Seed(time.Now().UTC().UnixNano()) @@ -35,7 +35,8 @@ const ( func main() { m := NewMain() - fmt.Fprintf(m.Stderr, "Pilosa %s\n", Build) + m.Server.Handler.Version = Version + fmt.Fprintf(m.Stderr, "Pilosa %s\n", Version) // Parse command line arguments. if err := m.ParseFlags(os.Args[1:]); err != nil { diff --git a/handler.go b/handler.go index 175161384..dc7b87bd3 100644 --- a/handler.go +++ b/handler.go @@ -45,7 +45,6 @@ type Handler struct { // NewHandler returns a new instance of Handler with a default logger. func NewHandler() *Handler { return &Handler{ - Version: Version, LogOutput: os.Stderr, } } diff --git a/pilosa.go b/pilosa.go index a93dc241c..dff78ebb1 100644 --- a/pilosa.go +++ b/pilosa.go @@ -23,9 +23,6 @@ var ( ErrQueryRequired = errors.New("query required") ) -// Version represents the current running version of Pilosa. -var Version string - // Profile represents vertical column in a database. // A profile can have a set of attributes attached to it. type Profile struct {