Skip to content

Commit

Permalink
fixes update message when the version is same (flyteorg#322)
Browse files Browse the repository at this point in the history
Signed-off-by: Yukesh Kumar <[email protected]>
  • Loading branch information
yk-x-25 authored and austin362667 committed May 7, 2024
1 parent 91832d6 commit 39002ec
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions flytectl/pkg/github/githubutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,23 @@ func GetUpgradeMessage(latest string, goos platformutil.Platform) (string, error
return "", err
}

var message string
if isGreater {
message = fmt.Sprintf(commonMessage, stdlibversion.Version, latest)
symlink, err := CheckBrewInstall(goos)
if err != nil {
return "", err
}
if len(symlink) > 0 {
message += brewMessage
} else if goos == platformutil.Darwin {
message += darwinMessage
} else if goos == platformutil.Linux {
message += linuxMessage
}
message += fmt.Sprintf(releaseURL, latest)
if !isGreater {
return "", err
}
message := fmt.Sprintf(commonMessage, stdlibversion.Version, latest)

symlink, err := CheckBrewInstall(goos)
if err != nil {
return "", err
}
if len(symlink) > 0 {
message += brewMessage
} else if goos == platformutil.Darwin {
message += darwinMessage
} else if goos == platformutil.Linux {
message += linuxMessage
}
message += fmt.Sprintf(releaseURL, latest)

return message, nil
}
Expand Down

0 comments on commit 39002ec

Please sign in to comment.