diff --git a/cmd/upgrade.go b/cmd/upgrade.go index f819904..a92a6fb 100644 --- a/cmd/upgrade.go +++ b/cmd/upgrade.go @@ -52,8 +52,9 @@ func runUpgrade() { targetVersion = "latest" } - if targetVersion == version { + if targetVersion == version && targetVersion != "latest" { fmt.Printf("✓ Current version: %s, upgradtion ignored.\n", version) + return } // remote version check @@ -86,6 +87,11 @@ func runUpgrade() { } targetVersion = result.TagName + if targetVersion == version { + fmt.Printf("✓ Current version: %s, you are up to date.\n", version) + return + } + fmt.Printf("✓ Version %s is available, upgrading now...\n", targetVersion) upgrade() diff --git a/cmd/version.go b/cmd/version.go index 46a11be..6ed4373 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/cobra" ) -const version = "v1.0.0" +const version = "v1.0.1" // versionCmd represents the version command var versionCmd = &cobra.Command{