Fix Gradle wrapper usage on Windows when building BWC (elastic/x-pack-elasticsearch#3509)

Relates elastic/x-pack-elasticsearch#3502

Original commit: elastic/x-pack-elasticsearch@de69017a4f
This commit is contained in:
Yannick Welsch 2018-01-09 11:58:41 +01:00 committed by GitHub
parent e92947e1b9
commit bd3d652901
1 changed files with 7 additions and 2 deletions

View File

@ -186,7 +186,12 @@ subprojects {
task buildBwcVersion(type: Exec) {
dependsOn checkoutXPackBwcBranch, checkoutElasticsearchBwcBranch, writeElasticsearchBuildMetadata, writeXPackBuildMetadata
workingDir = xpackCheckoutDir
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
executable 'cmd'
args '/C', 'call', new File(xpackCheckoutDir, 'gradlew').toString()
} else {
executable = new File(xpackCheckoutDir, 'gradlew').toString()
}
final ArrayList<String> commandLineArgs = [":x-pack-elasticsearch:plugin:assemble"]
final LogLevel logLevel = gradle.startParameter.logLevel
if ([LogLevel.QUIET, LogLevel.WARN, LogLevel.INFO, LogLevel.DEBUG].contains(logLevel)) {
@ -199,7 +204,7 @@ subprojects {
} else if (showStacktraceName.equals("ALWAYS_FULL")) {
commandLineArgs << "--full-stacktrace"
}
args = commandLineArgs
args commandLineArgs
}
artifacts {