Publishing flag
This commit is contained in:
parent
4b90233286
commit
757b609d26
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Added
|
### Added
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
- `publication.platform` changed to `publishing.platform`
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "ru.mipt.npm"
|
group = "ru.mipt.npm"
|
||||||
version = "0.9.0"
|
version = "0.9.1"
|
||||||
|
|
||||||
description = "Build tools for DataForge and kscience projects"
|
description = "Build tools for DataForge and kscience projects"
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ internal fun Project.isSnapshot() = version.toString().contains("dev") || versio
|
|||||||
|
|
||||||
internal val Project.publicationTarget: String
|
internal val Project.publicationTarget: String
|
||||||
get() {
|
get() {
|
||||||
val publicationPlatform = project.findProperty("publication.platform") as? String
|
val publicationPlatform = project.findProperty("publishing.platform") as? String
|
||||||
return if (publicationPlatform == null) {
|
return if (publicationPlatform == null) {
|
||||||
"AllPublications"
|
"AllPublications"
|
||||||
} else {
|
} else {
|
||||||
@ -110,8 +110,12 @@ internal fun Project.addGithubPublishing(
|
|||||||
githubOrg: String,
|
githubOrg: String,
|
||||||
githubProject: String
|
githubProject: String
|
||||||
) {
|
) {
|
||||||
|
if (requestPropertyOrNull("publishing.enabled") != "true") {
|
||||||
|
logger.info("Skipping github publishing because publishing is disabled")
|
||||||
|
return
|
||||||
|
}
|
||||||
if (requestPropertyOrNull("publishing.github") == "false") {
|
if (requestPropertyOrNull("publishing.github") == "false") {
|
||||||
logger.info("Skipping github publishing based on flag value")
|
logger.info("Skipping github publishing because `publishing.github == false`")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,8 +144,12 @@ internal fun Project.addGithubPublishing(
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal fun Project.addSpacePublishing(spaceRepo: String) {
|
internal fun Project.addSpacePublishing(spaceRepo: String) {
|
||||||
|
if (requestPropertyOrNull("publishing.enabled") != "true") {
|
||||||
|
logger.info("Skipping github publishing because publishing is disabled")
|
||||||
|
return
|
||||||
|
}
|
||||||
if (requestPropertyOrNull("publishing.space") == "false") {
|
if (requestPropertyOrNull("publishing.space") == "false") {
|
||||||
logger.info("Skipping space publishing based on flag value")
|
logger.info("Skipping space publishing because `publishing.space == false`")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,12 +179,16 @@ internal fun Project.addSpacePublishing(spaceRepo: String) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal fun Project.addSonatypePublishing() {
|
internal fun Project.addSonatypePublishing() {
|
||||||
if(isSnapshot()){
|
if(requestPropertyOrNull("publishing.enabled")!="true"){
|
||||||
|
logger.info("Skipping github publishing because publishing is disabled")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (isSnapshot()) {
|
||||||
logger.info("Sonatype publishing skipped for dev version")
|
logger.info("Sonatype publishing skipped for dev version")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (requestPropertyOrNull("publishing.sonatype") == "false") {
|
if (requestPropertyOrNull("publishing.sonatype") == "false") {
|
||||||
logger.info("Skipping sonatype publishing based on flag value")
|
logger.info("Skipping sonatype publishing because `publishing.sonatype == false`")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user