Skip to content

Commit

Permalink
Update build.gradle
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
  • Loading branch information
reta committed Feb 11, 2025
1 parent 41be571 commit 57ba379
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bwc-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,13 @@ String nextOpenSearch = extractVersion(nextVersion) + "-SNAPSHOT";

// Extracts the OpenSearch version from a plugin version string, 2.4.0.0 -> 2.4.0.
def String extractVersion(versionStr) {
def versionMatcher = versionStr =~ /(.+?)(\.\d+)(?:-(?:alpha|beta|rc)\d+)?$/
def versionMatcher = versionStr =~ /(.+?)(\.\d+)(-(alpha|beta|rc)\d+)?$/
versionMatcher.find()
return versionMatcher.group(1)
if (versionMatcher.group(3) != null) { /* there is a qualifier */
return versionMatcher.group(1) + versionMatcher.group(3)
} else {
return versionMatcher.group(1)
}
}

2.times {i ->
Expand Down

0 comments on commit 57ba379

Please sign in to comment.