From 2d9bf73049bff512748823b67e2b62a830aee294 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Mon, 12 Jun 2017 19:02:20 +0200 Subject: [PATCH] Sort plugins before uploading --- upload_plugins.gradle | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/upload_plugins.gradle b/upload_plugins.gradle index fd90ab3a018..2965f8140ff 100644 --- a/upload_plugins.gradle +++ b/upload_plugins.gradle @@ -25,7 +25,16 @@ task uploadPlugins() << { def repo = new org.jetbrains.intellij.pluginRepository.PluginRepositoryInstance( "https://plugins.jetbrains.com/", username, password) - new File(path).eachFileMatch(~/kotlin-plugin-.*\.zip/) { file -> + + File[] files = new File(path).listFiles({ File f, String filename -> + filename.startsWith("kotlin-plugin") && filename.endsWith(".zip") + } as FilenameFilter) + + files = files.sort { f1, f2 -> + f1.name.contains("1.1.2-5") ? 1 : (f2.name.contains("1.1.2-5") ? -1 : (f1.name <=> f2.name)) + } + + files.each { println("Uploading ${file.name}") repo.uploadPlugin(6954, file, channel) }