You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by zr...@apache.org on 2023/07/11 11:18:17 UTC

[camel-website] branch main updated: fix: prioritize the weight of RC vs M releases

This is an automated email from the ASF dual-hosted git repository.

zregvart pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-website.git


The following commit(s) were added to refs/heads/main by this push:
     new cb243de6 fix: prioritize the weight of RC vs M releases
cb243de6 is described below

commit cb243de672d844254f975a6c534902f8b5f0265d
Author: Zoran Regvart <zo...@regvart.com>
AuthorDate: Tue Jul 11 12:07:52 2023 +0200

    fix: prioritize the weight of RC vs M releases
    
    Fixes #1027
---
 layouts/partials/releases/version_sort.html | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/layouts/partials/releases/version_sort.html b/layouts/partials/releases/version_sort.html
index 58e748e1..82d69a84 100644
--- a/layouts/partials/releases/version_sort.html
+++ b/layouts/partials/releases/version_sort.html
@@ -9,13 +9,20 @@
     {{ range split $version "." }}
         {{ if strings.ContainsAny . "-RCM" }}
             {{ range split . "-" }}
-                {{ range split . "M" }}
-                    {{ range split . "RC" }}
+                {{ if hasPrefix . "M"}}
+                    {{ range split . "M" }}
                         {{ if . }}
                             {{ $version_num = add (mul $version_num 1000) (int .) }}
                         {{ end }}
                     {{ end }}
                 {{ end }}
+                {{ if hasPrefix . "RC"}}
+                    {{ range split . "RC" }}
+                        {{ if . }}
+                            {{ $version_num = add (mul $version_num 1000) (mul 100 (int .)) }}
+                        {{ end }}
+                    {{ end }}
+                {{ end }}
             {{ end }}
         {{ else }}
             {{ $version_num = add (mul $version_num 1000000) (mul (int .) 1000) }}