summaryrefslogtreecommitdiffstats
path: root/docs/en
diff options
context:
space:
mode:
authorGervase Markham <gerv@gerv.net>2014-01-29 11:06:18 +0100
committerGervase Markham <gerv@mozilla.org>2014-01-29 11:06:18 +0100
commitad80278d40e175ce4d9f9dfffffc0d4b3de46d7a (patch)
treeb1676a566250f3dcf9304cfcc1f8794843a59319 /docs/en
parent0f76ed497bca8bcfdd1be8e07a5554c22c2afc90 (diff)
downloadbugzilla-ad80278d40e175ce4d9f9dfffffc0d4b3de46d7a.tar.gz
bugzilla-ad80278d40e175ce4d9f9dfffffc0d4b3de46d7a.tar.xz
Bug 963145 - conf.py should read Bugzilla version from its canonical location. r=glob, a=justdave
Diffstat (limited to 'docs/en')
-rw-r--r--docs/en/rst/conf.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/docs/en/rst/conf.py b/docs/en/rst/conf.py
index 20ea71295..3cb412a3e 100644
--- a/docs/en/rst/conf.py
+++ b/docs/en/rst/conf.py
@@ -11,7 +11,7 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
-import sys, os
+import sys, os, re
# 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
@@ -51,9 +51,20 @@ copyright = u'2014, The Bugzilla Team'
# built documents.
#
# The short X.Y version.
-version = '4.5.2'
+version = 'Unknown'
# The full version, including alpha/beta/rc tags.
-release = '4.5.2'
+release = 'Unknown'
+
+for line in open("../../../Bugzilla/Constants.pm"):
+ match = re.search(r'BUGZILLA_VERSION\s+=>\s+"([^"]+)"', line)
+ if (match):
+ release = match.group(1)
+ match = re.search(r'^\d+\.\d+', release)
+ if (match):
+ version = match.group(0)
+ else:
+ version = release
+ break
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.