diff options
author | chriseth <chris@ethereum.org> | 2017-02-07 19:26:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 19:26:08 +0800 |
commit | acea98487a88ed976f012544bdef37a86fe38fb8 (patch) | |
tree | f5172d8e58f5a70043ba0e93911fdff7a7f7f8b3 | |
parent | 277415be30588e9694552c43bdbc70cc93aab94a (diff) | |
parent | 94e5ab1e43adc3071941130b7652eb3b5f32c9f2 (diff) | |
download | dexon-solidity-acea98487a88ed976f012544bdef37a86fe38fb8.tar dexon-solidity-acea98487a88ed976f012544bdef37a86fe38fb8.tar.gz dexon-solidity-acea98487a88ed976f012544bdef37a86fe38fb8.tar.bz2 dexon-solidity-acea98487a88ed976f012544bdef37a86fe38fb8.tar.lz dexon-solidity-acea98487a88ed976f012544bdef37a86fe38fb8.tar.xz dexon-solidity-acea98487a88ed976f012544bdef37a86fe38fb8.tar.zst dexon-solidity-acea98487a88ed976f012544bdef37a86fe38fb8.zip |
Merge pull request #1655 from ethereum/docs-version
Take documentation version numbers from CMake
-rw-r--r-- | docs/conf.py | 10 |
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. |