summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-20 11:33:44 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-20 17:27:01 +0100
commit1cefabe0f0a2dd2ca8b6eb83e8e0824b72da941a (patch)
tree36993a6acee02680dbb77fd16bd93d6730f023dd
parenteee9fba7b4d5d7a268a495688039027390894e6d (diff)
downloadpoky-hardknott.tar.gz
conf.py/poky.yaml: Move version information to poky.yaml and read in conf.pyhardknott
Merge in the changes from master allowing conf.py to use information from poky.yaml. This allows the head version mapped to X.999 on the website to have the version information displayed clearly and correctly. (From yocto-docs rev: f462982ddb6e32052217d44c0c44e8a4df115589) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--documentation/conf.py22
-rw-r--r--documentation/poky.yaml2
2 files changed, 22 insertions, 2 deletions
diff --git a/documentation/conf.py b/documentation/conf.py
index e7c2e502f3..d2478ae00b 100644
--- a/documentation/conf.py
+++ b/documentation/conf.py
@@ -15,9 +15,27 @@
15import os 15import os
16import sys 16import sys
17import datetime 17import datetime
18try:
19 import yaml
20except ImportError:
21 sys.stderr.write("The Yocto Project Sphinx documentation requires PyYAML.\
22 \nPlease make sure to install pyyaml python package.\n")
23 sys.exit(1)
18 24
19current_version = "3.3.6" 25# current_version = "dev"
20bitbake_version = "1.50" 26# bitbake_version = "" # Leave empty for development branch
27# Obtain versions from poky.yaml instead
28with open("poky.yaml") as data:
29 buff = data.read()
30 subst_vars = yaml.safe_load(buff)
31 if "DOCCONF_VERSION" not in subst_vars:
32 sys.stderr.write("Please set DOCCONF_VERSION in poky.yaml")
33 sys.exit(1)
34 current_version = subst_vars["DOCCONF_VERSION"]
35 if "BITBAKE_SERIES" not in subst_vars:
36 sys.stderr.write("Please set BITBAKE_SERIES in poky.yaml")
37 sys.exit(1)
38 bitbake_version = subst_vars["BITBAKE_SERIES"]
21 39
22# String used in sidebar 40# String used in sidebar
23version = 'Version: ' + current_version 41version = 'Version: ' + current_version
diff --git a/documentation/poky.yaml b/documentation/poky.yaml
index 769a981b68..d57b4d7101 100644
--- a/documentation/poky.yaml
+++ b/documentation/poky.yaml
@@ -6,6 +6,8 @@ DISTRO_NAME_NO_CAP_LTS : "gatesgarth"
6YOCTO_DOC_VERSION : "3.3.6" 6YOCTO_DOC_VERSION : "3.3.6"
7YOCTO_DOC_VERSION_MINUS_ONE : "3.2.4" 7YOCTO_DOC_VERSION_MINUS_ONE : "3.2.4"
8DISTRO_REL_TAG : "yocto-3.3.6" 8DISTRO_REL_TAG : "yocto-3.3.6"
9DOCCONF_VERSION : "3.3.6"
10BITBAKE_SERIES : "1.50"
9POKYVERSION : "25.0.6" 11POKYVERSION : "25.0.6"
10YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;" 12YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
11YOCTO_DL_URL : "https://downloads.yoctoproject.org" 13YOCTO_DL_URL : "https://downloads.yoctoproject.org"