summaryrefslogtreecommitdiffstats
path: root/documentation/set_versions.py
diff options
context:
space:
mode:
authorQuentin Schulz <quentin.schulz@theobroma-systems.com>2022-04-14 13:33:26 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-19 12:37:42 +0100
commit8643342d80a73f14a84dcc4c9aed2e67a452cb5c (patch)
tree2be155de44fcf0a79008d00e30cd29e5d5c12112 /documentation/set_versions.py
parent7b3a83f7369f9688109fd19394f0b6998dd6eae7 (diff)
downloadpoky-8643342d80a73f14a84dcc4c9aed2e67a452cb5c.tar.gz
docs: set_versions.py: add information about obsolescence of a release
This adds support for marking releases as obsolete to make the detection algorithm smarter (in a later commit) than just checking if it's older than dunfell. Cc: Quentin Schulz <foss+yocto@0leil.net> (From yocto-docs rev: 6f40ef56054ecbd3d8b7310d748c1af78a689add) Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/set_versions.py')
-rwxr-xr-xdocumentation/set_versions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/documentation/set_versions.py b/documentation/set_versions.py
index fceff4dbce..0fcbb993be 100755
--- a/documentation/set_versions.py
+++ b/documentation/set_versions.py
@@ -207,7 +207,7 @@ with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switch
207 lines = r.readlines() 207 lines = r.readlines()
208 for line in lines: 208 for line in lines:
209 if "VERSIONS_PLACEHOLDER" in line: 209 if "VERSIONS_PLACEHOLDER" in line:
210 w.write(" 'dev': 'dev (%s)',\n" % release_series[devbranch]) 210 w.write(" 'dev': { 'title': 'dev (%s)', 'obsolete': false,},\n" % release_series[devbranch])
211 for branch in activereleases: 211 for branch in activereleases:
212 if branch == devbranch: 212 if branch == devbranch:
213 continue 213 continue
@@ -219,9 +219,9 @@ with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switch
219 if versions[-1] != "0": 219 if versions[-1] != "0":
220 version = version + "." + versions[-1] 220 version = version + "." + versions[-1]
221 versions.append(version) 221 versions.append(version)
222 w.write(" '%s': '%s',\n" % (version, version)) 222 w.write(" '%s': {'title': '%s', 'obsolete': %s,},\n" % (version, version, str(branch == ourseries).lower()))
223 if ourversion not in versions and ourseries != devbranch: 223 if ourversion not in versions and ourseries != devbranch:
224 w.write(" '%s': '%s',\n" % (ourversion, ourversion)) 224 w.write(" '%s': {'title': '%s', 'obsolete': true,},\n" % (ourversion, ourversion))
225 else: 225 else:
226 w.write(line) 226 w.write(line)
227 227