Skip to content

Commit

Permalink
Ignore minimum version check when running against Xray DEV version
Browse files Browse the repository at this point in the history
  • Loading branch information
srmish-jfrog committed Oct 22, 2024
1 parent 19f67fa commit 5060ca9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ const (
Version = "1.47.2"
)

const xrayDevVersion = "3.x-dev"

type MinVersionProduct string

const (
Expand Down Expand Up @@ -68,6 +70,10 @@ func getDefaultUserAgent() string {
}

func ValidateMinimumVersion(product MinVersionProduct, currentVersion, minimumVersion string) error {
if currentVersion == xrayDevVersion {
return nil
}

if !version.NewVersion(currentVersion).AtLeast(minimumVersion) {
return errorutils.CheckErrorf(MinimumVersionMsg, product, currentVersion, minimumVersion)
}
Expand Down

0 comments on commit 5060ca9

Please sign in to comment.