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)
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/99423c51 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/99423c51 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/99423c51 Branch: refs/heads/1.5.x Commit: 99423c5141fd77f63e5637ec15ada9d2d709d990 Parents: c9698b4 Author: Alexander Shorin <[email protected]> Authored: Tue Oct 15 19:18:08 2013 +0400 Committer: Alexander Shorin <[email protected]> Committed: Tue Oct 15 21:07:06 2013 +0400 ---------------------------------------------------------------------- share/doc/src/conf.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/99423c51/share/doc/src/conf.py ---------------------------------------------------------------------- diff --git a/share/doc/src/conf.py b/share/doc/src/conf.py index 0c649b8..3d2536e 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']
