Skip to content

Commit

Permalink
update upgrade prompt logic
Browse files Browse the repository at this point in the history
  • Loading branch information
poneding committed Apr 28, 2024
1 parent 56bdb61 commit a3bad63
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit a3bad63

Please sign in to comment.