Skip to content

Commit de5bb50

Browse files
committed
doc: handle new VERSION file and format
A recent PR changed where the release version is maintained (was in the hypervisor/Makefile, now in a VERSION file) and format (was a RC_VERSION variable, now a EXTRA_VERSION variable). The doc build process uses the version information when generating documents. Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
1 parent 7a7fc5b commit de5bb50

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

doc/conf.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
version_major = None
8080
version_minor = None
8181
version_rc = None
82-
for line in open(os.path.normpath("../hypervisor/Makefile")) :
82+
for line in open(os.path.normpath("../VERSION")) :
8383
# remove comments
8484
line = line.split('#', 1)[0]
8585
line = line.rstrip()
@@ -89,19 +89,17 @@
8989
version_major = val
9090
if key == 'MINOR_VERSION':
9191
version_minor = val
92-
if key == 'RC_VERSION':
92+
if key == 'EXTRA_VERSION':
9393
version_rc = val
9494
if version_major and version_minor and version_rc :
9595
break
9696
except:
9797
pass
9898
finally:
9999
if version_major and version_minor and version_rc :
100-
version = release = "v " + version_major + '.' + version_minor
101-
if int(version_rc) > 0 :
102-
version = release = version + '-rc' + version_rc
100+
version = release = "v " + version_major + '.' + version_minor + version_rc
103101
else:
104-
sys.stderr.write('Warning: Could not extract hypervisor version from Makefile\n')
102+
sys.stderr.write('Warning: Could not extract hypervisor version from VERSION file\n')
105103
version = release = "unknown"
106104

107105

0 commit comments

Comments
 (0)