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
|
||||
|
||||
### Changed
|
||||
- `publication.platform` changed to `publishing.platform`
|
||||
|
||||
### Deprecated
|
||||
|
||||
|
@ -8,7 +8,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "ru.mipt.npm"
|
||||
version = "0.9.0"
|
||||
version = "0.9.1"
|
||||
|
||||
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
|
||||
get() {
|
||||
val publicationPlatform = project.findProperty("publication.platform") as? String
|
||||
val publicationPlatform = project.findProperty("publishing.platform") as? String
|
||||
return if (publicationPlatform == null) {
|
||||
"AllPublications"
|
||||
} else {
|
||||
@ -110,8 +110,12 @@ internal fun Project.addGithubPublishing(
|
||||
githubOrg: String,
|
||||
githubProject: String
|
||||
) {
|
||||
if (requestPropertyOrNull("publishing.enabled") != "true") {
|
||||
logger.info("Skipping github publishing because publishing is disabled")
|
||||
return
|
||||
}
|
||||
if (requestPropertyOrNull("publishing.github") == "false") {
|
||||
logger.info("Skipping github publishing based on flag value")
|
||||
logger.info("Skipping github publishing because `publishing.github == false`")
|
||||
return
|
||||
}
|
||||
|
||||
@ -140,8 +144,12 @@ internal fun Project.addGithubPublishing(
|
||||
}
|
||||
|
||||
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") {
|
||||
logger.info("Skipping space publishing based on flag value")
|
||||
logger.info("Skipping space publishing because `publishing.space == false`")
|
||||
return
|
||||
}
|
||||
|
||||
@ -171,12 +179,16 @@ internal fun Project.addSpacePublishing(spaceRepo: String) {
|
||||
}
|
||||
|
||||
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")
|
||||
return
|
||||
}
|
||||
if (requestPropertyOrNull("publishing.sonatype") == "false") {
|
||||
logger.info("Skipping sonatype publishing based on flag value")
|
||||
logger.info("Skipping sonatype publishing because `publishing.sonatype == false`")
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user