From ba61c5659df8128b97d879ccadfeecfc8864c4c2 Mon Sep 17 00:00:00 2001 From: Shachar Menashe <92059693+srmish-jfrog@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:23:38 +0200 Subject: [PATCH] Ignore minimum version check when running against Xray DEV version (#1031) --- utils/utils.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/utils.go b/utils/utils.go index 3c0ba281a..22c4b5b58 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -31,6 +31,8 @@ const ( Version = "1.47.3" ) +const xrayDevVersion = "3.x-dev" + type MinVersionProduct string const ( @@ -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) }