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:
parent
e92947e1b9
commit
bd3d652901
|
@ -186,7 +186,12 @@ subprojects {
|
||||||
task buildBwcVersion(type: Exec) {
|
task buildBwcVersion(type: Exec) {
|
||||||
dependsOn checkoutXPackBwcBranch, checkoutElasticsearchBwcBranch, writeElasticsearchBuildMetadata, writeXPackBuildMetadata
|
dependsOn checkoutXPackBwcBranch, checkoutElasticsearchBwcBranch, writeElasticsearchBuildMetadata, writeXPackBuildMetadata
|
||||||
workingDir = xpackCheckoutDir
|
workingDir = xpackCheckoutDir
|
||||||
executable = new File(xpackCheckoutDir, 'gradlew').toString()
|
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 ArrayList<String> commandLineArgs = [":x-pack-elasticsearch:plugin:assemble"]
|
||||||
final LogLevel logLevel = gradle.startParameter.logLevel
|
final LogLevel logLevel = gradle.startParameter.logLevel
|
||||||
if ([LogLevel.QUIET, LogLevel.WARN, LogLevel.INFO, LogLevel.DEBUG].contains(logLevel)) {
|
if ([LogLevel.QUIET, LogLevel.WARN, LogLevel.INFO, LogLevel.DEBUG].contains(logLevel)) {
|
||||||
|
@ -199,7 +204,7 @@ subprojects {
|
||||||
} else if (showStacktraceName.equals("ALWAYS_FULL")) {
|
} else if (showStacktraceName.equals("ALWAYS_FULL")) {
|
||||||
commandLineArgs << "--full-stacktrace"
|
commandLineArgs << "--full-stacktrace"
|
||||||
}
|
}
|
||||||
args = commandLineArgs
|
args commandLineArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
|
|
Loading…
Reference in New Issue