diff --git a/pkg/util/version.go b/pkg/util/version.go index 9a11147..ebc414a 100644 --- a/pkg/util/version.go +++ b/pkg/util/version.go @@ -38,16 +38,16 @@ func (v ClientVersion) LessThan(o ClientVersion) bool { if o.Dev { return true } - if o.Major > v.Major { - return true + if v.Dev { + return false } - if o.Minor > v.Minor { - return true + if v.Major != o.Major { + return v.Major < o.Major } - if o.Patch > v.Patch { - return true + if v.Minor != o.Minor { + return v.Minor < o.Minor } - return false + return v.Patch < o.Patch } func ParseClientVersion(image string) ClientVersion {