[v2,4/4] docs: sphinx-static: switchers.js.in: do not mark branches as outdated

Message ID 20220420150444.174380-4-foss+yocto@0leil.net
State New
Headers show
Series [v2,1/4] docs: set_versions.py: mark as obsolete only branches and old tags from obsolete releases | expand

Commit Message

Quentin Schulz April 20, 2022, 3:04 p.m. UTC
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>

Branches can never be outdated so let's check the release is not a
branch (branches end with .999).

Cc: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
---
 documentation/sphinx-static/switchers.js.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/documentation/sphinx-static/switchers.js.in b/documentation/sphinx-static/switchers.js.in
index 1e523a188..8c016859b 100644
--- a/documentation/sphinx-static/switchers.js.in
+++ b/documentation/sphinx-static/switchers.js.in
@@ -233,7 +233,7 @@  by https://git.yoctoproject.org/yocto-autobuilder-helper/tree/scripts/run-docs-b
       $.each(switcher_versions, function(version, vers_data) {
         var series = version.substr(0, 3);
         if (series == current_series) {
-          if (version != release) {
+          if (version != release && release.endsWith('.999') == false) {
             $('#outdated-warning').html('This document is for outdated version ' + release + ', you should select the latest release version in this series, ' + version + '.');
             $('#outdated-warning').css('padding', '.5em');
             return false;