You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by jh...@apache.org on 2016/04/18 11:38:52 UTC

tajo git commit: Fix broken asf link

Repository: tajo
Updated Branches:
  refs/heads/master 9afd9abe3 -> fe3663411


Fix broken asf link


Project: http://git-wip-us.apache.org/repos/asf/tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/tajo/commit/fe366341
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/fe366341
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/fe366341

Branch: refs/heads/master
Commit: fe3663411d3e77b58c1b4f2f5dc0cf12e2987456
Parents: 9afd9ab
Author: Jinho Kim <jh...@apache.org>
Authored: Mon Apr 18 18:38:09 2016 +0900
Committer: Jinho Kim <jh...@apache.org>
Committed: Mon Apr 18 18:38:09 2016 +0900

----------------------------------------------------------------------
 pom.xml                           |  1 +
 tajo-docs/src/main/sphinx/conf.py | 38 +++++++++++++++++++++++++++++-----
 2 files changed, 34 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/fe366341/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b397793..d255652 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,6 +28,7 @@
   <artifactId>tajo-main</artifactId>
   <version>0.12.0-SNAPSHOT</version>
   <description>Tajo Main</description>
+  <url>http://tajo.apache.org/</url>
   <name>Tajo Main</name>
   <packaging>pom</packaging>
 

http://git-wip-us.apache.org/repos/asf/tajo/blob/fe366341/tajo-docs/src/main/sphinx/conf.py
----------------------------------------------------------------------
diff --git a/tajo-docs/src/main/sphinx/conf.py b/tajo-docs/src/main/sphinx/conf.py
index dbd9e14..c2278b0 100644
--- a/tajo-docs/src/main/sphinx/conf.py
+++ b/tajo-docs/src/main/sphinx/conf.py
@@ -24,14 +24,42 @@
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-import sys
-import os
+import sys, os, time
+import xml.dom.minidom
 
 # 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
 # documentation root, use os.path.abspath to make it absolute, like shown here.
 #sys.path.insert(0, os.path.abspath('.'))
 
+def child_node(node, name):
+    for i in node.childNodes:
+        if (i.nodeType == i.ELEMENT_NODE) and (i.tagName == name):
+            return i
+    return None
+
+
+def node_text(node):
+    return node.childNodes[0].data
+
+
+def maven_version(pom):
+    dom = xml.dom.minidom.parse(pom)
+    project = child_node(dom, 'project');
+
+    version = child_node(project, 'version')
+    if version:
+        return node_text(version)
+
+    parent = child_node(project, 'parent')
+    version = child_node(parent, 'version')
+    return node_text(version)
+
+
+def get_version():
+    return maven_version('../../../pom.xml')
+
+
 # -- General configuration ------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
@@ -58,16 +86,16 @@ master_doc = 'index'
 
 # General information about the project.
 project = u'Apache Tajo'
-copyright = u'2015, Apache Tajo Team'
+copyright = u'%s, Apache Tajo Team' % time.strftime('%Y')
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
 # The short X.Y version.
-version = '0.11'
+version = get_version()
 # The full version, including alpha/beta/rc tags.
-release = '0.11.0'
+release = version
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.