diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-20 11:33:44 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-20 17:27:13 +0100 |
commit | 13143ea85a1ab7703825c0673128c05845b96cb5 (patch) | |
tree | 101c7254ea721b3cf42eff3e1019270a20b973fa | |
parent | 686e2a9f47c1598cf2fb4e4d6b123252d09b92ec (diff) | |
download | poky-gatesgarth.tar.gz |
conf.py/poky.yaml: Move version information to poky.yaml and read in conf.pygatesgarth
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: 9dbd3e8726b5eebd067d01973540724ea3e246c4)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | documentation/conf.py | 21 | ||||
-rw-r--r-- | documentation/poky.yaml | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/documentation/conf.py b/documentation/conf.py index 1efd63ca15..fe27e3e0d2 100644 --- a/documentation/conf.py +++ b/documentation/conf.py | |||
@@ -15,8 +15,27 @@ | |||
15 | import os | 15 | import os |
16 | import sys | 16 | import sys |
17 | import datetime | 17 | import datetime |
18 | try: | ||
19 | import yaml | ||
20 | except 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 | ||
19 | current_version = "3.2.4" | 25 | # current_version = "dev" |
26 | # bitbake_version = "" # Leave empty for development branch | ||
27 | # Obtain versions from poky.yaml instead | ||
28 | with 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"] | ||
20 | 39 | ||
21 | # String used in sidebar | 40 | # String used in sidebar |
22 | version = 'Version: ' + current_version | 41 | version = 'Version: ' + current_version |
diff --git a/documentation/poky.yaml b/documentation/poky.yaml index 189f7bec6c..fb567a11dc 100644 --- a/documentation/poky.yaml +++ b/documentation/poky.yaml | |||
@@ -5,6 +5,8 @@ DISTRO_NAME_NO_CAP_MINUS_ONE : "dunfell" | |||
5 | YOCTO_DOC_VERSION : "3.2.4" | 5 | YOCTO_DOC_VERSION : "3.2.4" |
6 | YOCTO_DOC_VERSION_MINUS_ONE : "3.1.7" | 6 | YOCTO_DOC_VERSION_MINUS_ONE : "3.1.7" |
7 | DISTRO_REL_TAG : "yocto-3.2.4" | 7 | DISTRO_REL_TAG : "yocto-3.2.4" |
8 | DOCCONF_VERSION : "3.2.4" | ||
9 | BITBAKE_SERIES : "1.48" | ||
8 | POKYVERSION : "24.0.4" | 10 | POKYVERSION : "24.0.4" |
9 | YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;" | 11 | YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;" |
10 | YOCTO_DL_URL : "https://downloads.yoctoproject.org" | 12 | YOCTO_DL_URL : "https://downloads.yoctoproject.org" |