diff options
author | Alexander Shorin <kxepal@apache.org> | 2013-10-15 19:18:08 +0400 |
---|---|---|
committer | Alexander Shorin <kxepal@apache.org> | 2013-10-15 19:18:08 +0400 |
commit | dd20a0fa69e85e985f70e65d6291416d529a2c34 (patch) | |
tree | 1b7c93c53051834909ecd5d59397d34b8947f75f | |
parent | 08f0009d47e4f39f49fee820647f7051c6496b03 (diff) | |
download | couchdb-dd20a0fa69e85e985f70e65d6291416d529a2c34.tar.gz |
Fix release version generation for docs.
The logic:
- If you didn't run ./bootstrap the version will be X.Y.Z-dev
- If you did: X.Y.Z+build.hash
- For CouchDB releases - just X.Y.Z (because we remove STAGE/RELEASE
info from acinclude.m4.in)
-rw-r--r-- | share/doc/src/conf.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/share/doc/src/conf.py b/share/doc/src/conf.py index 0c649b89b..3d2536e25 100644 --- a/share/doc/src/conf.py +++ b/share/doc/src/conf.py @@ -24,10 +24,10 @@ _info = {} _regex = re.compile('m4_define\(\[(.+)\],\s+\[(.+)\]\)') _acinclude_m4 = '../../../acinclude.m4' _acinclude_m4_in = '../../../acinclude.m4.in' -if os.path.exists(_acinclude_m4_in): - _source = _acinclude_m4_in -elif os.path.exists(_acinclude_m4): +if os.path.exists(_acinclude_m4): _source = _acinclude_m4 +elif os.path.exists(_acinclude_m4_in): + _source = _acinclude_m4_in else: _source = None if _source is not None: @@ -50,11 +50,12 @@ release = '.'.join([ _info['LOCAL_VERSION_MAJOR'], _info['LOCAL_VERSION_MINOR'], _info['LOCAL_VERSION_REVISION'] -]) + ( - _info['LOCAL_VERSION_STAGE'] + '' + _info['LOCAL_VERSION_RELEASE'] - if _info.get('LOCAL_VERSION_RELEASE') == '%revision%' - else '-dev' -) +]) + +if _info.get('LOCAL_VERSION_RELEASE') == '.%revision%': + release += '-dev' +elif _info.get('LOCAL_VERSION_RELEASE'): + release += _info['LOCAL_VERSION_STAGE'] + _info['LOCAL_VERSION_RELEASE'] project = _info['LOCAL_PACKAGE_NAME'] |