fix(docs): get version
Git tag will no longer include 'tf-rmm-' prefix.
Fix version assignment when SHA is empty.
Signed-off-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Change-Id: I8a3eb3b710fd243ed873ee60611d065f9f3a7623
diff --git a/docs/conf.py b/docs/conf.py
index 248b9c0..b865e5b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -18,14 +18,14 @@
title = 'User Guide'
try:
- vregx = re.compile(r'tf-rmm-(?P<GIT_VERSION>v.+?)'
+ vregx = re.compile(r'(?P<RMM_VERSION>v.+?)'
r'(-[0-9]+-)?(?P<GIT_SHA>g[a-f0-9]{7,})?$')
git_result = check_output("git describe --tags --always",
shell = True, encoding = 'UTF-8')
_v = vregx.match(git_result)
- release = _v.group('GIT_VERSION')
+ version = _v.group('RMM_VERSION')
if _v.group('GIT_SHA'):
- version = release + "+" + _v.group('GIT_SHA')[:7]
+ version += "+" + _v.group('GIT_SHA')[:7]
except:
version = 'Unknown'