diff options
Diffstat (limited to 'documentation/set_versions.py')
-rwxr-xr-x | documentation/set_versions.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/documentation/set_versions.py b/documentation/set_versions.py index 4114ae5737..8ae02b11f9 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py | |||
@@ -199,16 +199,13 @@ if os.path.exists("poky.yaml.in"): | |||
199 | # - current doc version | 199 | # - current doc version |
200 | # (with duplicates removed) | 200 | # (with duplicates removed) |
201 | 201 | ||
202 | if ourseries not in activereleases: | ||
203 | activereleases.append(ourseries) | ||
204 | |||
205 | versions = [] | 202 | versions = [] |
206 | with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switchers.js", "w") as w: | 203 | with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switchers.js", "w") as w: |
207 | lines = r.readlines() | 204 | lines = r.readlines() |
208 | for line in lines: | 205 | for line in lines: |
209 | if "VERSIONS_PLACEHOLDER" in line: | 206 | if "VERSIONS_PLACEHOLDER" in line: |
210 | w.write(" 'dev': { 'title': 'dev (%s)', 'obsolete': false,},\n" % release_series[devbranch]) | 207 | w.write(" 'dev': { 'title': 'dev (%s)', 'obsolete': false,},\n" % release_series[devbranch]) |
211 | for branch in activereleases: | 208 | for branch in activereleases + ([ourseries] if ourseries not in activereleases else []): |
212 | if branch == devbranch: | 209 | if branch == devbranch: |
213 | continue | 210 | continue |
214 | branch_versions = subprocess.run('git tag --list yocto-%s*' % (release_series[branch]), shell=True, capture_output=True, text=True).stdout.split() | 211 | branch_versions = subprocess.run('git tag --list yocto-%s*' % (release_series[branch]), shell=True, capture_output=True, text=True).stdout.split() |
@@ -219,7 +216,7 @@ with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switch | |||
219 | if branch_versions[-1] != "0": | 216 | if branch_versions[-1] != "0": |
220 | version = version + "." + branch_versions[-1] | 217 | version = version + "." + branch_versions[-1] |
221 | versions.append(version) | 218 | versions.append(version) |
222 | w.write(" '%s': {'title': '%s', 'obsolete': %s,},\n" % (version, version, str(branch == ourseries).lower())) | 219 | w.write(" '%s': {'title': '%s', 'obsolete': %s,},\n" % (version, version, str(branch not in activereleases).lower())) |
223 | if ourversion not in versions and ourseries != devbranch: | 220 | if ourversion not in versions and ourseries != devbranch: |
224 | w.write(" '%s': {'title': '%s', 'obsolete': true,},\n" % (ourversion, ourversion)) | 221 | w.write(" '%s': {'title': '%s', 'obsolete': true,},\n" % (ourversion, ourversion)) |
225 | else: | 222 | else: |