Stop publishing CLI's Homebrew formula in commercial builds
Closes gh-43247
This commit is contained in:
parent
c36d307f6a
commit
cf1dadf2e7
|
|
@ -1,3 +1,6 @@
|
||||||
|
import org.springframework.boot.build.properties.BuildProperties
|
||||||
|
import org.springframework.boot.build.properties.BuildType
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "java"
|
id "java"
|
||||||
id "eclipse"
|
id "eclipse"
|
||||||
|
|
@ -104,6 +107,7 @@ task tar(type: Tar) {
|
||||||
configureArchive it
|
configureArchive it
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (BuildProperties.get(project).buildType() == BuildType.OPEN_SOURCE) {
|
||||||
task homebrewFormula(type: org.springframework.boot.build.cli.HomebrewFormula) {
|
task homebrewFormula(type: org.springframework.boot.build.cli.HomebrewFormula) {
|
||||||
dependsOn tar
|
dependsOn tar
|
||||||
outputDir = layout.buildDirectory.dir("homebrew")
|
outputDir = layout.buildDirectory.dir("homebrew")
|
||||||
|
|
@ -117,13 +121,21 @@ def homebrewFormulaArtifact = artifacts.add("archives", file(layout.buildDirecto
|
||||||
builtBy "homebrewFormula"
|
builtBy "homebrewFormula"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
publishing {
|
||||||
|
publications {
|
||||||
|
getByName("maven") {
|
||||||
|
artifact homebrewFormulaArtifact
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
getByName("maven") {
|
getByName("maven") {
|
||||||
artifact fullJar
|
artifact fullJar
|
||||||
artifact tar
|
artifact tar
|
||||||
artifact zip
|
artifact zip
|
||||||
artifact homebrewFormulaArtifact
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue