[3/5] set_versions: Add support for setting POKYVERSION found in older releases

Message ID 20220321174455.1189669-4-richard.purdie@linuxfoundation.org
State New
Headers show
Series Proposed docs version changes | expand

Commit Message

Richard Purdie March 21, 2022, 5:44 p.m. UTC
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 documentation/set_versions.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

Patch

diff --git a/documentation/set_versions.py b/documentation/set_versions.py
index a4bfaf1bf..a121125ac 100755
--- a/documentation/set_versions.py
+++ b/documentation/set_versions.py
@@ -34,6 +34,13 @@  bitbake_mapping = {
     "dunfell" : "1.46",
 }
 
+# 3.4 onwards doesn't have poky version
+poky_mapping = {
+    "3.3" : "25.0",
+    "3.2" : "24.0",
+    "3.1" : "23.0",
+}
+
 ourversion = None
 ourseries = None
 ourbranch = None
@@ -121,6 +128,10 @@  replacements = {
     "BITBAKE_SERIES" : bitbakeversion,
 }
 
+if release_series[ourseries] in poky_mapping:
+    pokyversion = poky_mapping[release_series[ourseries]] + "." + ourversion.rsplit(".", 1)[1]
+    replacements["POKYVERSION"] = pokyversion
+
 with open("poky.yaml.in", "r") as r, open("poky.yaml", "w") as w:
     lines = r.readlines()
     for line in lines: