mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 06:21:00 +00:00
Update documentation config
This commit is contained in:
parent
89cd4a5e17
commit
e61c8d4cba
@ -56,14 +56,11 @@ copyright = u'2012-2014, Victor Zverovich'
|
|||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
|
|
||||||
# Get version from CMakeLists.txt.
|
# Get version from CMakeLists.txt.
|
||||||
version = {}
|
|
||||||
with open('../CMakeLists.txt') as f:
|
with open('../CMakeLists.txt') as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
m = re.match(r'set\(CPACK_PACKAGE_VERSION_([A-Z]+) ([0-9]+)\)', line.strip())
|
m = re.match(r'set\(CPPFORMAT_VERSION (.+)\)', line.strip())
|
||||||
if m:
|
if m:
|
||||||
kind, value = m.groups()
|
version = m.group(1)
|
||||||
version[kind] = value
|
|
||||||
version = '{}.{}.{}'.format(version['MAJOR'], version['MINOR'], version['PATCH'])
|
|
||||||
|
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = version
|
release = version
|
||||||
|
Loading…
Reference in New Issue
Block a user