Fix stable BWC branch detection logic
This commit fixes the logic for finding the stable BWC branch. A .x
branch should only be chosen if we are testing BWC with a previous major
version.
@@ -56,7 +56,7 @@ if (enabled) {
def (String major, String minor, String bugfix) = bwcVersion.split('\\.')
def (String currentMajor, String currentMinor, String currentBugfix) = version.split('\\.')
String bwcBranch
- if (project.name == 'bwc-stable-snapshot') {
+ if (project.name == 'bwc-stable-snapshot' && major != currentMajor) {
bwcBranch = "${major}.x"
} else {
bwcBranch = "${major}.${minor}"
