docs: Extract current version from git and use it in the install instructions.
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
# import os
|
||||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
import os
|
||||
import re
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
@@ -20,6 +22,18 @@ project = 'Kapow!'
|
||||
copyright = '2019, BBVA Innovation Labs'
|
||||
author = 'BBVA Innovation Labs'
|
||||
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
try:
|
||||
release = re.sub('^v', '', os.popen('git describe').read().strip())
|
||||
except:
|
||||
release = 'unknown'
|
||||
|
||||
try:
|
||||
# The short X.Y.Z-rcN version.
|
||||
version = re.search('^(\d+\.\d+\.\d+(:?-rc\d+)?)', release).group(0)
|
||||
except:
|
||||
version = release
|
||||
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user