summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2013-12-19 17:37:22 +0100
committerJan Lehnardt <jan@apache.org>2013-12-27 20:11:38 +0100
commite24ff92187a2fba3545a01a4c39bd3adca7f56a2 (patch)
treef3e1bf782e9f618c109150e52a90f7d6dc9ee4f4
parent044c60fd0aa62b1ea2da3edc08048582d3ee7c6d (diff)
downloadcouchdb-e24ff92187a2fba3545a01a4c39bd3adca7f56a2.tar.gz
Docs: Fix doc building under CI
Under CI the CouchDB version configured can break the LaTeX PDF building. This patch munges the release name for doc builds. Python styles from Eli Stevens and Alexander Shorin. Closes COUCHDB-2007
-rw-r--r--share/doc/src/conf.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/share/doc/src/conf.py b/share/doc/src/conf.py
index 3d2536e25..14a93f5c2 100644
--- a/share/doc/src/conf.py
+++ b/share/doc/src/conf.py
@@ -55,7 +55,16 @@ release = '.'.join([
if _info.get('LOCAL_VERSION_RELEASE') == '.%revision%':
release += '-dev'
elif _info.get('LOCAL_VERSION_RELEASE'):
- release += _info['LOCAL_VERSION_STAGE'] + _info['LOCAL_VERSION_RELEASE']
+ # jenkins hack, the release name is too long or uses
+ # characters that cause pain down the road. Example:
+ # 1.6.0+build.jenkins-ERLANG_VERSION=R14B04,label=Mac-OS-10-8-2-832-76-g2996574
+ # which breaks the LaTeX PDF build. Let’s strip this
+ # down to the git hash at the end.
+ if 'jenkins' in _info['LOCAL_VERSION_RELEASE']:
+ release += _info['LOCAL_VERSION_RELEASE'][-9:]
+ else: # regular case
+ release += _info['LOCAL_VERSION_STAGE'] + _info['LOCAL_VERSION_RELEASE']
+
project = _info['LOCAL_PACKAGE_NAME']