Test: update the branch logic for BWC tests

This commit updates the logic for determining which branch to use to make it consistent with the
logic in elasticsearch. This change means that testing BWC within the same major picks the correct
branch.

Original commit: elastic/x-pack-elasticsearch@2d75d15c41
This commit is contained in:
jaymode 2017-11-09 13:03:40 -07:00
parent efb5b8827b
commit 9d85f377c7

View File

@ -38,7 +38,7 @@ subprojects {
def (String major, String minor, String bugfix) = bwcVersion.split('\\.')
def (String currentMajor, String currentMinor, String currentBugfix) = version.split('\\.')
String bwcBranch
if (project.name == 'stable-snapshot') {
if (project.name == 'stable-snapshot' && major != currentMajor) {
bwcBranch = "${major}.x"
} else {
bwcBranch = "${major}.${minor}"