Skip to content

Commit

Permalink
Merge pull request #10 from juicedata/fix/version
Browse files Browse the repository at this point in the history
fix version compare
  • Loading branch information
zwwhdls authored Sep 27, 2024
2 parents d84e8ac + 6c06197 commit 9178c25
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkg/util/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 9178c25

Please sign in to comment.