From 6c7075cba4f3c0d01085abeb6f7ff03b5b5adb5a Mon Sep 17 00:00:00 2001 From: Elena Lepilkina Date: Fri, 17 May 2019 16:30:16 +0300 Subject: [PATCH] Fix of minor versions --- tools/performance-server/ui/src/main/kotlin/main.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/performance-server/ui/src/main/kotlin/main.kt b/tools/performance-server/ui/src/main/kotlin/main.kt index 476ad66b7a0..83ecc074b1c 100644 --- a/tools/performance-server/ui/src/main/kotlin/main.kt +++ b/tools/performance-server/ui/src/main/kotlin/main.kt @@ -224,7 +224,7 @@ fun main(args: Array) { error("Response is expected to be an array.") } val builds = data.jsonArray.map { Build.create(it as JsonObject) } - .sortedWith(compareBy ( { it.buildNumber.substringBefore("-").toDouble() }, { it.buildNumber.substringAfterLast("-").toInt() })) + .sortedWith(compareBy ( { it.buildNumber.substringBefore(".").toInt() }, { it.buildNumber.substringAfter(".").substringBefore("-").toDouble() }, { it.buildNumber.substringAfterLast("-").toInt() })) val branchesUrl = "$serverUrl/branches/${parameters["target"]}"