trim -release- from plugin version number when checking whether the runtime is outdated

This commit is contained in:
Dmitry Jemerov
2016-02-14 15:04:54 +01:00
parent 24edbc36df
commit 2a8e1af489
2 changed files with 3 additions and 1 deletions
@@ -174,5 +174,5 @@ private val OUTDATED_RUNTIME_GROUP_DISPLAY_ID = "Outdated Kotlin Runtime"
fun isRuntimeOutdated(libraryVersion: String?, runtimeVersion: String): Boolean {
return libraryVersion == null || libraryVersion.startsWith("internal-") != runtimeVersion.startsWith("internal-") ||
VersionComparatorUtil.compare(runtimeVersion, libraryVersion) > 0
VersionComparatorUtil.compare(runtimeVersion.substringBefore("-release-"), libraryVersion) > 0
}
@@ -69,6 +69,8 @@ class KotlinRuntimeLibraryUtilTest : TestCase() {
notOutdated("1.0.0-beta1-001-Idea3-1", "1.0.0-beta1-001")
notOutdated("1.0.0-beta1-001-Idea3-(1)", "1.0.0-beta1-001")
notOutdated("1.0.0-release-IJ143-12", "1.0.0")
outdated("1.0.0-beta1-002-Idea141-1", "1.0.0-beta1-001")
outdated("1.0.0-beta1-010-Idea141-1", "1.0.0-beta1-009")
outdated("1.0.0-beta1-100-Idea141-1", "1.0.0-beta1-099")