[RFC] docs: sphinx-static: switchers.js.in: do not mark branches as outdated

Message ID 20220420112953.152555-1-foss+yocto@0leil.net
State New
Headers show
Series [RFC] docs: sphinx-static: switchers.js.in: do not mark branches as outdated | expand

Commit Message

Quentin Schulz April 20, 2022, 11:29 a.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>
---

RFC: because this cannot be tested until we get
https://git.yoctoproject.org/yocto-docs/commit/?h=wip&id=a828e6d91c110d77deb8568b9bb31e894c1446fe
or patches in all branches to adapt conf.py to take info from poky.yaml
to have release set to X.Y.999 for branches.

 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 2bc18160d..774d87cf8 100644
--- a/documentation/sphinx-static/switchers.js.in
+++ b/documentation/sphinx-static/switchers.js.in
@@ -235,7 +235,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;