diff options
Diffstat (limited to 'documentation/set_versions.py')
-rwxr-xr-x | documentation/set_versions.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/documentation/set_versions.py b/documentation/set_versions.py index 96e0d34697..94e2704a50 100755 --- a/documentation/set_versions.py +++ b/documentation/set_versions.py | |||
@@ -149,3 +149,22 @@ with open("poky.yaml.in", "r") as r, open("poky.yaml", "w") as w: | |||
149 | 149 | ||
150 | print("poky.yaml generated from poky.yaml.in") | 150 | print("poky.yaml generated from poky.yaml.in") |
151 | 151 | ||
152 | with open("sphinx-static/switchers.js.in", "r") as r, open("sphinx-static/switchers.js", "w") as w: | ||
153 | lines = r.readlines() | ||
154 | for line in lines: | ||
155 | if "VERSIONS_PLACEHOLDER" in line: | ||
156 | w.write(" 'dev': 'dev (%s)',\n" % release_series[devbranch]) | ||
157 | for branch in activereleases: | ||
158 | if branch == devbranch: | ||
159 | continue | ||
160 | versions = subprocess.run('git tag --list yocto-%s*' % (release_series[branch]), shell=True, capture_output=True, text=True).stdout.split() | ||
161 | versions = sorted([v.replace("yocto-" + release_series[branch] + ".", "").replace("yocto-" + release_series[branch], "0") for v in versions], key=int) | ||
162 | version = release_series[branch] | ||
163 | if versions[-1] != "0": | ||
164 | version = version + "." + versions[-1] | ||
165 | w.write(" '%s': '%s',\n" % (version, version)) | ||
166 | else: | ||
167 | w.write(line) | ||
168 | |||
169 | print("switchers.js generated from switchers.js.in") | ||
170 | |||