Skip to content

Commit f5ae11a

Browse files
Update version extraction
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
1 parent 0299b5f commit f5ae11a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

bwc-test/build.gradle

+2-8
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,9 @@ String baseName = "customCodecsBwcCluster"
8484
String bwcFilePath = "src/test/resources/"
8585
String projectVersion = nextVersion
8686

87-
String previousOpenSearch = extractVersion(previousVersion) + "-SNAPSHOT";
88-
String nextOpenSearch = extractVersion(nextVersion) + "-SNAPSHOT";
89-
9087
// Extracts the OpenSearch version from a plugin version string, 2.11.0.0 -> 2.11.0.
91-
def String extractVersion(versionStr) {
92-
def versionMatcher = versionStr =~ /(.+?)(\.\d+)$/
93-
versionMatcher.find()
94-
return versionMatcher.group(1)
95-
}
88+
String previousOpenSearch = previousVersion.tokenize('-')[0][0..-3] + "-SNAPSHOT"
89+
String nextOpenSearch = nextVersion.tokenize('-')[0][0..-3] + "-SNAPSHOT"
9690

9791
2.times {i ->
9892
testClusters {

0 commit comments

Comments
 (0)