From 5886dae974fab915fe837e88e50d4ac1edea25c0 Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Sat, 12 Mar 2016 11:01:52 +0000 Subject: [PATCH] Don't read from app.Version before we initialise it, otherwise we report 'dev' back to the checkpoint service. --- prog/app.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/prog/app.go b/prog/app.go index d9167a216..c017e6a30 100644 --- a/prog/app.go +++ b/prog/app.go @@ -48,6 +48,11 @@ func appMain() { defer log.Info("app exiting") + rand.Seed(time.Now().UnixNano()) + app.UniqueID = strconv.FormatInt(rand.Int63(), 16) + app.Version = version + log.Infof("app starting, version %s, ID %s", app.Version, app.UniqueID) + // Start background version checking checkpoint.CheckInterval(&checkpoint.CheckParams{ Product: "scope-app", @@ -61,11 +66,6 @@ func appMain() { } }) - rand.Seed(time.Now().UnixNano()) - app.UniqueID = strconv.FormatInt(rand.Int63(), 16) - app.Version = version - log.Infof("app starting, version %s, ID %s", app.Version, app.UniqueID) - // If user supplied a weave router address, periodically try and register // out IP address in WeaveDNS. if *weaveAddr != "" {