From 42d9b24a54d6cd0ac55bddfaa4d71a454902e3df Mon Sep 17 00:00:00 2001 From: "David B. Kinder" Date: Tue, 11 Sep 2018 16:18:01 -0700 Subject: [PATCH] doc: allow overriding displayed doc version In special cases, we'd like to freeze doc versions based on a tag (e.g., tags/acrn-2018w34.4-140000p) and have that version show up on the generated docs. (Normally the version shown is from the hypervisor/VERSION file.) With this patch, if DOC_TAG=release then it uses a RELEASE=name environment variable (e.g., from the make command line) to override the displayed version: make DOC_TAG=release RELEASE=acrn-2018w34.4-140000p html make DOC_TAG=release RELEASE=acrn-2018w34.4-140000p publish Assuming you've checked out the tagged branch (both for acrn-hypervisor and acrn-kernel), these make commands will generate and publish docs to https://projectacrn.github.io/acrn-2018w34.4-14000p Signed-off-by: David B. Kinder --- doc/conf.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 3b5188005..36fa0499c 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -20,6 +20,9 @@ import os import sys sys.path.insert(0, os.path.abspath('.')) +RELEASE = "" +if "RELEASE" in os.environ: + RELEASE = os.environ["RELEASE"] # -- General configuration ------------------------------------------------ @@ -177,6 +180,8 @@ else: if tags.has('release'): current_version = version + if RELEASE: + version = current_version = RELEASE else: version = current_version = "latest"