Skip to content

Commit

Permalink
Fix the missing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
LinuxSuRen committed May 18, 2022
1 parent 74467d5 commit 0d8e059
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion version/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func (o *SelfUpgradeOption) Download(log common.Printer, version, currentVersion
Org: o.Org,
Repo: o.Repo,
}
if asset, assetErr := ghClient.GetLatestJCLIAsset(); assetErr == nil && asset != nil {
if asset, assetErr := ghClient.GetLatestReleaseAsset(o.Org, o.Repo); assetErr == nil && asset != nil {
version = asset.TagName
} else {
err = fmt.Errorf("cannot get the latest version, error: %s", assetErr)
Expand Down
2 changes: 1 addition & 1 deletion version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (o *PrintOption) RunE(cmd *cobra.Command, _ []string) (err error) {
}

if o.ShowLatest {
if asset, err = ghClient.GetLatestJCLIAsset(); err == nil && asset != nil {
if asset, err = ghClient.GetLatestReleaseAsset(o.Org, o.Repo); err == nil && asset != nil {
cmd.Println("The latest version", asset.TagName)
if o.Changelog {
cmd.Println("Changelog:")
Expand Down

0 comments on commit 0d8e059

Please sign in to comment.