Skip to content

Commit

Permalink
removed upgrade notice when running upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanisham committed Aug 1, 2024
1 parent dad2862 commit a8ff26d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cli/meta/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

const (
VERSION = "v0.7.3"
VERSION = "v0.7.4"
// VERSION = "v0.0.0" // For testing zvm upgrade

)
Expand Down
8 changes: 7 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
)

var zvm cli.ZVM
var printUpgradeNotice bool = true

var zvmApp = &opts.App{
Name: "ZVM",
Expand Down Expand Up @@ -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()
},
},
Expand Down Expand Up @@ -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)
}
}

}

0 comments on commit a8ff26d

Please sign in to comment.