Revision 9860
Added by Jing Tao over 8 years ago
docs/user/metacat/source/conf.py | ||
---|---|---|
11 | 11 |
# All configuration values have a default; values that are commented out |
12 | 12 |
# serve to show the default. |
13 | 13 |
|
14 |
import sys, os |
|
14 |
import sys, os, ConfigParser, StringIO
|
|
15 | 15 |
|
16 |
#Read the release version from the metacat.properties file |
|
17 |
prop = '[dummy]\n' + open('../../../../lib/metacat.properties').read() |
|
18 |
config = ConfigParser.SafeConfigParser() |
|
19 |
config.readfp(StringIO.StringIO(prop)) |
|
20 |
#print config.get('dummy', 'application.metacatVersion') |
|
21 |
|
|
16 | 22 |
# If extensions (or modules to document with autodoc) are in another directory, |
17 | 23 |
# add these directories to sys.path here. If the directory is relative to the |
18 | 24 |
# documentation root, use os.path.abspath to make it absolute, like shown here. |
... | ... | |
47 | 53 |
# The short X.Y version. |
48 | 54 |
version = '2.8' |
49 | 55 |
# The full version, including alpha/beta/rc tags. |
50 |
release = '2.8.0'
|
|
56 |
release = config.get('dummy', 'application.metacatVersion')
|
|
51 | 57 |
|
52 | 58 |
# The language for content autogenerated by Sphinx. Refer to documentation |
53 | 59 |
# for a list of supported languages. |
Also available in: Unified diff
With the help of Roger, the release will read the version from the metacat.properties file rather hard-coded.