Commit 1cefabe0 authored by Richard Purdie's avatar Richard Purdie
Browse files

conf.py/poky.yaml: Move version information to poky.yaml and read in conf.py


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: default avatarRichard Purdie <richard.purdie@linuxfoundation.org>
parent eee9fba7
No related merge requests found
Showing with 22 additions and 2 deletions
+22 -2
......@@ -15,9 +15,27 @@
import os
import sys
import datetime
try:
import yaml
except ImportError:
sys.stderr.write("The Yocto Project Sphinx documentation requires PyYAML.\
\nPlease make sure to install pyyaml python package.\n")
sys.exit(1)
current_version = "3.3.6"
bitbake_version = "1.50"
# current_version = "dev"
# bitbake_version = "" # Leave empty for development branch
# Obtain versions from poky.yaml instead
with open("poky.yaml") as data:
buff = data.read()
subst_vars = yaml.safe_load(buff)
if "DOCCONF_VERSION" not in subst_vars:
sys.stderr.write("Please set DOCCONF_VERSION in poky.yaml")
sys.exit(1)
current_version = subst_vars["DOCCONF_VERSION"]
if "BITBAKE_SERIES" not in subst_vars:
sys.stderr.write("Please set BITBAKE_SERIES in poky.yaml")
sys.exit(1)
bitbake_version = subst_vars["BITBAKE_SERIES"]
# String used in sidebar
version = 'Version: ' + current_version
......
......@@ -6,6 +6,8 @@ DISTRO_NAME_NO_CAP_LTS : "gatesgarth"
YOCTO_DOC_VERSION : "3.3.6"
YOCTO_DOC_VERSION_MINUS_ONE : "3.2.4"
DISTRO_REL_TAG : "yocto-3.3.6"
DOCCONF_VERSION : "3.3.6"
BITBAKE_SERIES : "1.50"
POKYVERSION : "25.0.6"
YOCTO_POKY : "poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;"
YOCTO_DL_URL : "https://downloads.yoctoproject.org"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment