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) {
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue