diff options
author | Quentin Schulz <quentin.schulz@theobroma-systems.com> | 2022-05-05 12:43:00 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-05-10 12:52:34 +0100 |
commit | 4d111eb73710250c57cbbbd552602eb1d0eab73f (patch) | |
tree | 99607a0345ce879aa2a476bda2af7b2775638fa9 | |
parent | f09f1de84ce060a83bd200c21796986aafa6538e (diff) | |
download | poky-4d111eb73710250c57cbbbd552602eb1d0eab73f.tar.gz |
docs: set_versions.py: show release name in switchers.js
Also show release names in the dropdown menu so that people have
knowledge of both the version number and release name of whatever
they're using or planning to use or upgrade to.
This patch will make the dropdown menu show the following entries:
Unstable (dev)
Kirkstone (4.0)
Honister (3.4.3)
Cc: Quentin Schulz <foss+yocto@0leil.net>
(From yocto-docs rev: 83867cd979810a023eb7e2d243782e6202873273)
Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | documentation/set_versions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/documentation/set_versions.py b/documentation/set_versions.py index c4be1ae41e..c409d5ea86 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py | |||
@@ -211,7 +211,7 @@ with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switch | |||
211 | w.write(str(list(release_series.keys()))) | 211 | w.write(str(list(release_series.keys()))) |
212 | continue | 212 | continue |
213 | if "VERSIONS_PLACEHOLDER" in line: | 213 | if "VERSIONS_PLACEHOLDER" in line: |
214 | w.write(" 'dev': { 'title': 'dev (%s)', 'obsolete': false,},\n" % release_series[devbranch]) | 214 | w.write(" 'dev': { 'title': 'Unstable (dev)', 'obsolete': false,},\n") |
215 | for branch in activereleases + ([ourseries] if ourseries not in activereleases else []): | 215 | for branch in activereleases + ([ourseries] if ourseries not in activereleases else []): |
216 | if branch == devbranch: | 216 | if branch == devbranch: |
217 | continue | 217 | continue |
@@ -223,9 +223,9 @@ with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switch | |||
223 | if branch_versions[-1] != "0": | 223 | if branch_versions[-1] != "0": |
224 | version = version + "." + branch_versions[-1] | 224 | version = version + "." + branch_versions[-1] |
225 | versions.append(version) | 225 | versions.append(version) |
226 | w.write(" '%s': {'title': '%s', 'obsolete': %s,},\n" % (version, version, str(branch not in activereleases).lower())) | 226 | w.write(" '%s': {'title': '%s (%s)', 'obsolete': %s,},\n" % (version, branch.capitalize(), version, str(branch not in activereleases).lower())) |
227 | if ourversion not in versions and ourseries != devbranch: | 227 | if ourversion not in versions and ourseries != devbranch: |
228 | w.write(" '%s': {'title': '%s', 'obsolete': %s,},\n" % (ourversion, ourversion, str(ourseries not in activereleases).lower())) | 228 | w.write(" '%s': {'title': '%s (%s)', 'obsolete': %s,},\n" % (ourversion, ourseries.capitalize(), ourversion, str(ourseries not in activereleases).lower())) |
229 | else: | 229 | else: |
230 | w.write(line) | 230 | w.write(line) |
231 | 231 | ||