From fc1085cbd31e8d5df37ef9beca1053e973a0c2ca Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Fri, 8 Mar 2024 18:43:22 +0700 Subject: [PATCH] Plugin publication: fix the channel selector (#444) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Plugin publication: fix the channel selector Before this patch, publisher was always using the channel corresponding to the first number in the plugin version for release builds. This is because by default, Kotlin's substringAfter will return the whole input string if it's unable to find the needle. * Bump org.gradle.toolchains.foojay-resolver-convention Bumps org.gradle.toolchains.foojay-resolver-convention from 0.7.0 to 0.8.0. --- updated-dependencies: - dependency-name: org.gradle.toolchains.foojay-resolver-convention   dependency-type: direct:production   update-type: version-update:semver-minor * Release workflow: remove Java (#443) * Release workflow: remove Java It is not required in this workflow anyway. * CHANGELOG.md update --------- Co-authored-by: Jakub Chrzanowski * CHANGELOG.md update --------- Co-authored-by: KotlinIsland <65446343+kotlinisland@users.noreply.github.com> Co-authored-by: Jakub Chrzanowski --- CHANGELOG.md | 4 ++++ build.gradle.kts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e63b3ee..9cb89f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ - Gradle - upgrade `org.gradle.toolchains.foojay-resolver-convention` to `0.8.0` +### Fixed + +- Fixed calculation of the plugin publication channel + ### Removed - GitHub Actions: Remove the `Setup Java` step from the `releaseDraft` build step diff --git a/build.gradle.kts b/build.gradle.kts index 7b867e7..c5e5958 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -126,6 +126,6 @@ tasks { // The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel - channels = properties("pluginVersion").map { listOf(it.substringAfter('-').substringBefore('.').ifEmpty { "default" }) } + channels = properties("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) } } }