From a8ff26d379a961bf36083b3025eb3d481b2e09f1 Mon Sep 17 00:00:00 2001 From: Tristan Isham Date: Thu, 1 Aug 2024 16:31:04 -0400 Subject: [PATCH] removed upgrade notice when running upgrade --- cli/meta/version.go | 2 +- main.go | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cli/meta/version.go b/cli/meta/version.go index 42e16fc..b9e1e50 100644 --- a/cli/meta/version.go +++ b/cli/meta/version.go @@ -9,7 +9,7 @@ import ( ) const ( - VERSION = "v0.7.3" + VERSION = "v0.7.4" // VERSION = "v0.0.0" // For testing zvm upgrade ) diff --git a/main.go b/main.go index 6de2966..caae592 100644 --- a/main.go +++ b/main.go @@ -17,6 +17,7 @@ import ( ) var zvm cli.ZVM +var printUpgradeNotice bool = true var zvmApp = &opts.App{ Name: "ZVM", @@ -183,6 +184,7 @@ var zvmApp = &opts.App{ Name: "upgrade", Usage: "self-upgrade ZVM", Action: func(ctx *opts.Context) error { + printUpgradeNotice = false return zvm.Upgrade() }, }, @@ -246,7 +248,11 @@ func main() { } if tag := <-upSig; tag != "" { - meta.CtaUpgradeAvailable(tag) + if printUpgradeNotice { + meta.CtaUpgradeAvailable(tag) + } else { + log.Infof("You are now using ZVM %s\n", tag) + } } }