From 8f73a7cc630bb61d088c7cdad30a6708870184ee Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 14 Sep 2011 09:13:51 -0400
Subject: [PATCH] Implemented Federation Sets. Documentation.

---
 build.xml |   63 ++++++++++++++++++++++++++-----
 1 files changed, 53 insertions(+), 10 deletions(-)

diff --git a/build.xml b/build.xml
index 5d38648..1025943 100644
--- a/build.xml
+++ b/build.xml
@@ -2,7 +2,8 @@
 <project name="gitblit" default="compile" basedir=".">
 
 	<!-- Google Code upload task -->
-	<taskdef classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask" classpath="${basedir}/tools/ant-googlecode-0.0.3.jar" name="gcupload"/>
+	<taskdef classname="net.bluecow.googlecode.ant.GoogleCodeUploadTask" 
+		classpath="${basedir}/tools/ant-googlecode-0.0.3.jar" name="gcupload"/>
 
 	<!-- Project Properties -->
 	<property name="project.jar" value="gitblit.jar" />
@@ -12,9 +13,19 @@
 	<property name="project.war.dir" value="${basedir}/war" />
 	<property name="project.site.dir" value="${basedir}/site" />
 	<property name="project.resources.dir" value="${basedir}/resources" />	
+	<available property="hasBuildProps" file="${basedir}/build.properties"/>
 
-	<!-- Load publication servers, paths, and credentials --> 
-	<loadproperties srcfile="${basedir}/build.properties" />
+	<!--
+		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+		Load build.properties, if available
+		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	-->
+	<target name="buildprops" if="hasBuildProps">
+		<!-- Load publication servers, paths, and credentials --> 
+		<loadproperties>
+			<file file="${basedir}/build.properties" />
+		</loadproperties>
+	</target>
 	
 	
 	<!--
@@ -22,7 +33,7 @@
 		Scrape the version info from code and setup the build properties 
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 	-->
-	<target name="buildinfo">
+	<target name="buildinfo" depends="buildprops">
 	
 		<!-- extract Gitblit version number from source code -->
 		<loadfile property="gb.version" srcfile="${basedir}/src/com/gitblit/Constants.java">
@@ -191,6 +202,7 @@
 					<include name="bug_16x16.png" />
 					<include name="book_16x16.png" />
 					<include name="blank.png" />
+					<include name="federated_16x16.png" />
 				</fileset>
 
 				<!-- Copy Doc images -->
@@ -249,9 +261,21 @@
 				<arg value="--substitute" />
 				<arg value="%JGIT%=${jgit.version}" />
 
-				<arg value="--load" />
+				<arg value="--properties" />
 				<arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
 
+				<arg value="--nomarkdown" />
+				<arg value="%BEGINCODE%:%ENDCODE%" />
+
+				<arg value="--substitute" />
+				<arg value="&quot;%BEGINCODE%=&lt;pre class='prettyprint lang-java'&gt;&quot;" />
+
+				<arg value="--substitute" />
+				<arg value="%ENDCODE%=&lt;/pre&gt;" />
+				
+				<arg value="--regex" />
+				<arg value="&quot;\b(issue)(\s*[#]?|-){0,1}(\d+)\b!!!&lt;a href='http://code.google.com/p/gitblit/issues/detail?id=$3'&gt;issue $3&lt;/a&gt;&quot;" />
+		
 			</java>
 	</target>
 	
@@ -365,6 +389,7 @@
 				<include name="bug_16x16.png" />
 				<include name="book_16x16.png" />
 				<include name="blank.png" />
+				<include name="federated_16x16.png" />
 			</fileset>
 
 			<!-- Copy Doc images -->
@@ -423,9 +448,15 @@
 
 			<arg value="--pageHeader" />
 			<arg value="${basedir}/docs/site_header.html" />
-
+			
 			<arg value="--pageFooter" />
 			<arg value="${basedir}/docs/site_footer.html" />
+
+			<arg value="--analyticsSnippet" />
+			<arg value="${basedir}/docs/site_analytics.html" />
+				
+			<arg value="--adSnippet" />
+			<arg value="${basedir}/docs/site_ads.html" />
 
 			<arg value="--alias" />
 			<arg value="index=overview" />
@@ -448,10 +479,22 @@
 			<arg value="--substitute" />
 			<arg value="%JGIT%=${jgit.version}" />
 
-			<arg value="--load" />
+			<arg value="--properties" />
 			<arg value="%PROPERTIES%=${basedir}/distrib/gitblit.properties" />
+			
+			<arg value="--nomarkdown" />
+			<arg value="%BEGINCODE%:%ENDCODE%" />
 
-		</java>
+			<arg value="--substitute" />
+			<arg value="&quot;%BEGINCODE%=&lt;pre class='prettyprint lang-java'&gt;&quot;" />
+
+			<arg value="--substitute" />
+			<arg value="%ENDCODE%=&lt;/pre&gt;" />
+
+			<arg value="--regex" />
+			<arg value="&quot;\b(issue)(\s*[#]?|-){0,1}(\d+)\b!!!&lt;a href='http://code.google.com/p/gitblit/issues/detail?id=$3'&gt;issue $3&lt;/a&gt;&quot;" />
+
+		</java>	
 	</target>
 		
 
@@ -484,7 +527,7 @@
 			 projectname="gitblit" 
 			 filename="${distribution.zipfile}" 
 			 targetfilename="gitblit-${gb.version}.zip"
-			 summary="Standalone, integrated Gitblit server v${gb.version}"
+			 summary="Gitblit GO v${gb.version} (standalone, integrated Gitblit server)"
 			 labels="Featured, Type-Package, OpSys-All" />
 			
 		<!-- Upload WAR file -->
@@ -494,7 +537,7 @@
 		     projectname="gitblit" 
 		     filename="${distribution.warfile}" 
 		     targetfilename="gitblit-${gb.version}.war"
-		     summary="Gitblit WAR v${gb.version} for your servlet container"
+		     summary="Gitblit WAR v${gb.version} (standard WAR webapp for servlet containers)"
 		     labels="Featured, Type-Package, OpSys-All" />
 	</target>
 

--
Gitblit v1.9.1