Skip to content

Commit

Permalink
more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziopandini committed Aug 18, 2023
1 parent 4781590 commit ac48f76
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cmd/clusterctl/cmd/version_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,16 @@ func (v *versionChecker) getLatestRelease(ctx context.Context) (*ReleaseInfo, er
if err != nil {
return nil, errors.Wrap(err, "unable to read version state file")
}
if vs != nil {
if vs != nil && false {
return &vs.LatestRelease, nil
}

// Try to get latest clusterctl version number from go modules.
latest, err := v.goproxyGetLatest()
if err == nil && latest != nil {
if err != nil {
log.V(5).Info("error using Goproxy client to get latest versions for clusterctl, falling back to github client")
}
if latest != nil {
vs = &VersionState{
LastCheck: time.Now(),
LatestRelease: *latest,
Expand Down Expand Up @@ -199,7 +202,7 @@ func (v *versionChecker) goproxyGetLatest() (*ReleaseInfo, error) {
return nil, nil
}

gomodulePath := path.Join("github.com", "kubernetes-sigs", "cluster-api")
gomodulePath := path.Join("sigs.k8s.io", "cluster-api")
versions, err := v.goproxyClient.GetVersions(context.TODO(), gomodulePath)
if err != nil {
return nil, err
Expand Down

0 comments on commit ac48f76

Please sign in to comment.