Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -650,8 +650,21 @@ task integTestRemote(type: RestIntegTestTask) {
}

// === Set up BWC tests ===

String bwcVersionShort = "2.19.0"
// get latest 2.x version from OpenSearch 2.x branch
static def fetchVersionProperties() {
def url = 'https://raw.githubusercontent.com/opensearch-project/OpenSearch/refs/heads/2.x/buildSrc/version.properties'
def content = new URL(url).text
// Use regex to extract the version number
def matcher = content =~ /opensearch\s*=\s*(\d+\.\d+\.\d+)/
if (matcher.find()) {
def version = matcher.group(1)
println("Extracted latest 2.x version: $version")
return version
} else {
return "2.19.0"
}
}
String bwcVersionShort = fetchVersionProperties()
String bwcVersion = bwcVersionShort + ".0"
String baseName = "indexmanagementBwcCluster"

Expand Down
Loading