doc: update display of RC version

Change display of RC_VERSION on documents to be
  vMAJOR_VERSION.MINOR_VERSION-rcRC_VERSION
if RC_VERSION is non-zero, otherwise only
  vMAJOR_VERSION.MINOR_VERSION

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
This commit is contained in:
David B. Kinder 2018-03-09 07:35:54 -08:00 committed by Jack Ren
parent cf707cc62e
commit df5c261362
1 changed files with 3 additions and 1 deletions

View File

@ -77,7 +77,9 @@ except:
pass
finally:
if version_major and version_minor and version_rc :
version = release = "v " + version_major + '.' + version_minor + '.' + version_rc
version = release = "v " + version_major + '.' + version_minor
if int(version_rc) > 0 :
version = release = version + '-rc' + version_rc
else:
sys.stderr.write('Warning: Could not extract hypervisor version from Makefile\n')
version = release = "unknown"