Generate version from pom.xml 19/88719/3
authorThanh Ha <zxiiro@gmail.com>
Thu, 26 Mar 2020 18:48:08 +0000 (14:48 -0400)
committerThanh Ha <zxiiro@gmail.com>
Mon, 25 May 2020 23:09:47 +0000 (19:09 -0400)
With controller becoming MRI generate docs version from pom.xml
as ODL version codenames are no longer relevant for MRI projects.

This reuses the code put into mdsal.

Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: I584d2e2c59ce0055699c804bffcd91bdf44aab94

docs/conf.py
docs/conf.yaml

index 925316a..57d8120 100644 (file)
 # http://www.eclipse.org/legal/epl-v10.html
 ##############################################################################
 
+import xml.etree.ElementTree as ET
+
 from docs_conf.conf import *
 
+data = ET.parse('pom.xml')
+project_version = data.getroot().find('*//{http://maven.apache.org/POM/4.0.0}version').text
+version = project_version
+release = project_version
index d3e6680..dc9cd8f 100644 (file)
@@ -1,4 +1,2 @@
 project_cfg: opendaylight
 project: Controller
-version: Magnesium
-

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.