Fix building bwc versions (#40361)

Account for openjdk when figuring out what java version to
use for building bwc versions.
This commit is contained in:
Alpar Torok 2019-03-22 19:27:01 +02:00 committed by Gordon Brown
parent 9acd20874b
commit b52d44cc98
1 changed files with 2 additions and 1 deletions

View File

@ -169,8 +169,9 @@ bwcVersions.forPreviousUnreleased { BwcVersions.UnreleasedVersionInfo unreleased
'JAVA_HOME',
getJavaHome(it, Integer.parseInt(
lines
.findAll({ it.startsWith("ES_BUILD_JAVA=java") })
.findAll({ it.startsWith("ES_BUILD_JAVA=")})
.collect({ it.replace("ES_BUILD_JAVA=java", "").trim() })
.collect({ it.replace("ES_BUILD_JAVA=openjdk", "").trim() })
.join("!!")
))
)