diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c38604..5d0852f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Added +### Changed + +### Deprecated + +### Removed + +### Fixed + +### Security + +## [0.9.0] +### Added +- Skip sonatype publishing for dev versions + ### Changed - Publishing repositories are explicit and defined in the top level project - Paths to publishing properties now use dot notation like `publishing.github.user` diff --git a/build.gradle.kts b/build.gradle.kts index f844d1e..b645cc6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ plugins { } group = "ru.mipt.npm" -version = "0.9.0-dev-1" +version = "0.9.0" description = "Build tools for DataForge and kscience projects" diff --git a/src/main/kotlin/ru/mipt/npm/gradle/internal/publishing.kt b/src/main/kotlin/ru/mipt/npm/gradle/internal/publishing.kt index 983ef1f..cec6a2b 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/internal/publishing.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/internal/publishing.kt @@ -110,7 +110,10 @@ internal fun Project.addGithubPublishing( githubOrg: String, githubProject: String ) { - if (requestPropertyOrNull("publishing.github") == "false") return + if (requestPropertyOrNull("publishing.github") == "false") { + logger.info("Skipping github publishing based on flag value") + return + } val githubUser: String = requestProperty("publishing.github.user") val githubToken: String = requestProperty("publishing.github.token") @@ -137,7 +140,10 @@ internal fun Project.addGithubPublishing( } internal fun Project.addSpacePublishing(spaceRepo: String) { - if (requestPropertyOrNull("publishing.space") == "false") return + if (requestPropertyOrNull("publishing.space") == "false") { + logger.info("Skipping space publishing based on flag value") + return + } val spaceUser: String = requestProperty("publishing.space.user") val spaceToken: String = requestProperty("publishing.space.token") @@ -165,7 +171,14 @@ internal fun Project.addSpacePublishing(spaceRepo: String) { } internal fun Project.addSonatypePublishing() { - if (requestPropertyOrNull("publishing.sonatype") == "false") 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") + return + } val sonatypeUser: String = requestProperty("publishing.sonatype.user") val sonatypePassword: String = requestProperty("publishing.sonatype.password")