diff mbox series

set_versions.py: add bitbake-active-releases special argument

Message ID 20250915-bitbake-active-releases-v1-1-a2fdd3979965@bootlin.com
State New
Headers show
Series set_versions.py: add bitbake-active-releases special argument | expand

Commit Message

Antonin Godard Sept. 15, 2025, 12:19 p.m. UTC
We will use this in the autobuilder when generating the docs so we can
propagate the current active releases to bitbake, and have the correct
entries in bitbake's switchers.js.

Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
IMPORTANT: must be merged with following series/patches:
- "doc: fix the switchers menu" on the bitbake-devel list
- "scripts/run-docs-build: improvements for the bitbake menu" on the
  yocto-autobuilder-helper/yocto-patches list
---
 documentation/set_versions.py | 11 +++++++++++
 1 file changed, 11 insertions(+)


---
base-commit: dbc6137cd13f982a7fd4d1b2df79dccb177db0fc
change-id: 20241227-bitbake-active-releases-f15b5b6c366f

Best regards,
--  
Antonin Godard <antonin.godard@bootlin.com>
diff mbox series

Patch

diff --git a/documentation/set_versions.py b/documentation/set_versions.py
index b8dd4b1b9..36105fbc5 100755
--- a/documentation/set_versions.py
+++ b/documentation/set_versions.py
@@ -85,6 +85,17 @@  bitbake_mapping = {
     "dunfell" : "1.46",
 }
 
+# Special argument "bitbake-active-releases" prints the active bitbake releases
+# we define here, and exits. This is used in the autobuilder to pass this information to
+# bitbake's set_versions.py, which in turn sets bitbake's switchers.js
+# appropriately.
+if len(sys.argv) > 1:
+    if sys.argv[1] == "bitbake-active-releases":
+        for release in activereleases:
+            if release in bitbake_mapping:
+                print("%s,%s" % (bitbake_mapping[release], release))
+        exit(0)
+
 # 3.4 onwards doesn't have poky version
 # Early 3.4 release docs do reference it though
 poky_mapping = {