mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #1655 from ethereum/docs-version
Take documentation version numbers from CMake
This commit is contained in:
commit
acea98487a
10
docs/conf.py
10
docs/conf.py
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# 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
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
@ -56,9 +57,14 @@ copyright = '2016-2017, Ethereum'
|
|||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# 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.
|
# 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
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
Loading…
Reference in New Issue
Block a user