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

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>
(From yocto-docs rev: 4755961bbb5f674a7532b91cca20ea44a1e22ae7)

Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Quentin Schulz 2022-04-20 17:04:44 +02:00 committed by Richard Purdie
parent ee6718fe08
commit 57b80a8a9a

View File

@ -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;