aboutsummaryrefslogtreecommitdiffstats
path: root/docs/conf.py
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-02-07 00:00:29 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-02-07 00:00:29 +0800
commite5e0eae057816c6ed7f53a3972b7dff3032348ea (patch)
tree7625b6c0efce5f17184f204b19b191ccf67c1021 /docs/conf.py
parent3cbdafcfe947eafef7b8f6bbafd06f769261ae28 (diff)
downloaddexon-solidity-e5e0eae057816c6ed7f53a3972b7dff3032348ea.tar.gz
dexon-solidity-e5e0eae057816c6ed7f53a3972b7dff3032348ea.tar.zst
dexon-solidity-e5e0eae057816c6ed7f53a3972b7dff3032348ea.zip
Take documentation version numbers from CMake
Diffstat (limited to 'docs/conf.py')
-rw-r--r--docs/conf.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/conf.py b/docs/conf.py
index 159cd3ea..ca8c0fec 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -15,6 +15,7 @@
import sys
import os
+import re
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -56,9 +57,14 @@ copyright = '2016-2017, Ethereum'
# built documents.
#
# The short X.Y version.
-version = '0.4.10'
+with open('../CMakeLists.txt', 'r') as f:
+ version = re.search('PROJECT_VERSION "([^"]+)"', f.read()).group(1)
# The full version, including alpha/beta/rc tags.
-release = '0.4.10-develop'
+if os.path.isfile('../prerelease.txt') != True or os.path.getsize('../prerelease.txt') == 0:
+ release = version
+else:
+ # This is a prerelease version
+ release = version + '-develop'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.