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.
pull/444/head
Friedrich von Never 3 months ago
parent c25c79d3ed
commit e460475592

@ -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" }) }
}
}

Loading…
Cancel
Save