Delete duplicate logs

This commit is contained in:
caodonghui 2021-02-18 16:29:18 +08:00
parent 5bb03db026
commit f7469a0a31

View File

@ -18,7 +18,6 @@ package upgrade
import ( import (
"context" "context"
"fmt"
"github.com/pkg/errors" "github.com/pkg/errors"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
@ -134,11 +133,7 @@ func NewOfflineVersionGetter(versionGetter VersionGetter, version string) Versio
// VersionFromCILabel will return the version that was passed into the struct // VersionFromCILabel will return the version that was passed into the struct
func (o *OfflineVersionGetter) VersionFromCILabel(ciVersionLabel, description string) (string, *versionutil.Version, error) { func (o *OfflineVersionGetter) VersionFromCILabel(ciVersionLabel, description string) (string, *versionutil.Version, error) {
if o.version == "" { if o.version == "" {
versionStr, version, err := o.VersionGetter.VersionFromCILabel(ciVersionLabel, description) return o.VersionGetter.VersionFromCILabel(ciVersionLabel, description)
if err == nil {
fmt.Printf("[upgrade/versions] Latest %s: %s\n", description, versionStr)
}
return versionStr, version, err
} }
ver, err := versionutil.ParseSemantic(o.version) ver, err := versionutil.ParseSemantic(o.version)
if err != nil { if err != nil {