Don't build packages on non Linux (#48246)

* Don't build packages on non Linux

Closes #47007

* Explicitly exclude windows only
This commit is contained in:
Alpar Torok 2019-10-21 17:09:12 +03:00
parent 5729c04df2
commit cdfac9dfb0
2 changed files with 5 additions and 5 deletions

View File

@ -27,10 +27,6 @@ New-Item -ItemType directory -Path \tmp
$ErrorActionPreference="Continue"
# TODO: remove the task exclusions once dependencies are set correctly and these don't run for Windows or buldiung the deb on windows is fixed
& .\gradlew.bat -g "C:\Users\$env:username\.gradle" --parallel --scan --console=plain destructiveDistroTest `
-x :distribution:packages:buildOssDeb `
-x :distribution:packages:buildDeb `
-x :distribution:packages:buildOssRpm `
-x :distribution:packages:buildRpm `
& .\gradlew.bat -g "C:\Users\$env:username\.gradle" --parallel --scan --console=plain destructiveDistroTest
exit $?

View File

@ -19,6 +19,7 @@
import org.elasticsearch.gradle.LoggedExec
import org.elasticsearch.gradle.MavenFilteringHack
import org.redline_rpm.header.Flags
import org.elasticsearch.gradle.OS
import java.nio.file.Files
import java.nio.file.Path
@ -105,6 +106,9 @@ addProcessFilesTask('rpm', false, false)
// is the same
Closure commonPackageConfig(String type, boolean oss, boolean jdk) {
return {
onlyIf {
OS.current().equals(OS.WINDOWS) == false
}
dependsOn "process${oss ? 'Oss' : ''}${jdk ? '' : 'NoJdk'}${type.capitalize()}Files"
packageName "elasticsearch${oss ? '-oss' : ''}"
arch (type == 'deb' ? 'amd64' : 'X86_64')