From bd74f676d1b74e859c7583e9325d0ec6536704e8 Mon Sep 17 00:00:00 2001 From: friday Date: Sat, 21 Aug 2021 10:05:47 +0200 Subject: [PATCH] Tweak logic for which releases are stable * Change validation so only releases with a tags like "1.2.3" are considered stable, and the rest are unstable (pre-releases) * Use tag_name for verifying since name can be missing, and tag_name should have the last version. * Count pre-releases as unstable releases (if they have assets) --- assets/js/releases.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/releases.js b/assets/js/releases.js index 7a5cf03..de25475 100644 --- a/assets/js/releases.js +++ b/assets/js/releases.js @@ -101,8 +101,8 @@ jQuery(function($) { for (var i = 0; i < data.length; i++) { var item = data[i]; var assets = getAssets(item); - var isStable = item.name.indexOf('beta') === -1 && item.name.indexOf(' ') === -1; - if (!item.prerelease && assets && !item.draft && ((stable && isStable) || (!stable && !isStable))) { + var isStable = /^\d+\.\d+\.\d+$/.test(item.tag_name) && !item.prerelease; + if (assets && !item.draft && stable === isStable) { return { name: item.name, tag_name: item.tag_name,