From 550d5b02f84640a762ac8f8e1ba58c11cdeb0004 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 10 Jan 2023 12:20:37 +0100 Subject: [PATCH] android_studio_releases.main.kts: tune/fix channel badges --- .github/scripts/android_studio_releases.main.kts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/scripts/android_studio_releases.main.kts b/.github/scripts/android_studio_releases.main.kts index 604218179..8a28f9dae 100755 --- a/.github/scripts/android_studio_releases.main.kts +++ b/.github/scripts/android_studio_releases.main.kts @@ -20,12 +20,12 @@ import java.net.URL val RELEASES_LIST = "https://jb.gg/android-studio-releases-list.xml" val RELEASES_FILE_PATH_MD = "topics/_generated/android_studio_releases.md" val CHANNEL_BADGES_LIST = """ - [release]: https://img.shields.io/badge/-release-blue?style=flat-square - [patch]: https://img.shields.io/badge/-patch-orange?style=flat-square - [rc]: https://img.shields.io/badge/-rc-red?style=flat-square - [beta]: https://img.shields.io/badge/-beta-darkred?style=flat-square - [canary]: https://img.shields.io/badge/-canary-lightgrey?style=flat-square - [preview]: https://img.shields.io/badge/-preview-darktgrey?style=flat-square + [release]: https://img.shields.io/badge/-Release-blue?style=flat-square + [patch]: https://img.shields.io/badge/-Patch-orange?style=flat-square + [rc]: https://img.shields.io/badge/-RC-red?style=flat-square + [beta]: https://img.shields.io/badge/-Beta-darkred?style=flat-square + [canary]: https://img.shields.io/badge/-Canary-lightgrey?style=flat-square + [preview]: https://img.shields.io/badge/-Preview-darkgrey?style=flat-square """ val content = URL(RELEASES_LIST).readText() @@ -58,7 +58,7 @@ fun List.renderTable() = """ |--------------|:-------:|--------------|---------|-----------------------| """ + sortedByDescending { it.version.toLooseVersion() }.joinToString("\n") { val name = it.name.removePrefix("Android Studio").trim().replace("|", "\\|") - val channel = it.channel.lowercase().run { "![$this][$this]" } + val channel = it.channel.run { "![$this][${this.lowercase()}]" } val date = it.date val version = "**${it.version}**
${it.build}" val platform = "**${it.platformVersion}**
${it.platformBuild}"