From 43e32ec71a508e1bb68b247fdca74f64bcf629b3 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Tue, 28 Feb 2012 22:41:31 -0500
Subject: [PATCH] Draft integration of Lucene search mechanism and web ui

---
 build.xml |   60 +++++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 45 insertions(+), 15 deletions(-)

diff --git a/build.xml b/build.xml
index 3fe65ef..688f255 100644
--- a/build.xml
+++ b/build.xml
@@ -117,7 +117,7 @@
 
 		<delete dir="${project.build.dir}" />
 		<mkdir dir="${project.build.dir}" />
-		<javac debug="true" srcdir="${basedir}/src" destdir="${project.build.dir}">
+		<javac debug="true" srcdir="${basedir}/src" destdir="${project.build.dir}" includeantruntime="false">
 			<include name="com/gitblit/build/Build.java" />			
 			<include name="com/gitblit/Constants.java" />
 			<include name="com/gitblit/utils/StringUtils.java" />			
@@ -131,7 +131,7 @@
 			</fileset>
 			<pathelement path="${project.build.dir}" />				
 		</path>
-		<javac debug="true" destdir="${project.build.dir}" failonerror="false">
+		<javac debug="true" destdir="${project.build.dir}" failonerror="false" includeantruntime="false">
 			<src path="${basedir}/src" />
 			<classpath refid="master-classpath" />
 		</javac>
@@ -197,11 +197,12 @@
 			<param name="docs.output.dir" value="${project.deploy.dir}/docs" />
 		</antcall>
 		
-		<!-- Copy the sample Groovy hook scripts -->
+		<!-- Copy the supported Groovy hook scripts -->
 		<mkdir dir="${project.deploy.dir}/groovy" />
 		<copy todir="${project.deploy.dir}/groovy">
 			<fileset dir="${basedir}/groovy">
-				<include name="**/*" />
+				<include name="sendmail.groovy" />
+				<include name="jenkins.groovy" />
 			</fileset>
 		</copy>
 	
@@ -226,9 +227,8 @@
 			<copy todir="${docs.output.dir}">
 				<!-- Copy selected Gitblit resources -->
 				<fileset dir="${project.resources.dir}">
-					<include name="bootstrap.140.css" />
-					<include name="bootstrap.gb.css" />
-					<include name="markdown.css" />
+					<include name="bootstrap/**/*" />
+					<include name="gitblit.css" />
 					<include name="gitblt_25_white.png" />
 					<include name="gitblt-favicon.png" />
 					<include name="lock_go_16x16.png" />
@@ -364,11 +364,12 @@
 			<param name="docs.output.dir" value="${project.war.dir}/WEB-INF/docs" />
 		</antcall>
 
-		<!-- Copy the sample Groovy hook scripts -->
+		<!-- Copy the supported Groovy hook scripts -->
 		<mkdir dir="${project.war.dir}/WEB-INF/groovy" />
 		<copy todir="${project.war.dir}/WEB-INF/groovy">
 			<fileset dir="${basedir}/groovy">
-				<include name="**/*" />
+				<include name="sendmail.groovy" />
+				<include name="jenkins.groovy" />
 			</fileset>
 		</copy>
 
@@ -497,6 +498,15 @@
 		<copy tofile="${deployments.root}/WEB-INF/reference.properties" 
 			file="${basedir}/distrib/gitblit.properties"/>
 
+		<!-- Copy the supported Groovy hook scripts -->
+		<mkdir dir="${deployments.root}/WEB-INF/groovy" />
+		<copy todir="${deployments.root}/WEB-INF/groovy">
+			<fileset dir="${basedir}/groovy">
+				<include name="sendmail.groovy" />
+				<include name="jenkins.groovy" />
+			</fileset>
+		</copy>
+					
 		<!-- Build the WAR web.xml from the prototype web.xml and gitblit.properties -->
 		<!-- THIS FILE IS NOT OVERRIDDEN ONCE IT IS BUILT!!! -->
 		<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildWebXml">
@@ -567,6 +577,7 @@
 			<resource file="${basedir}/resources/gitblt-favicon.png" />
 			<resource file="${basedir}/resources/gitweb-favicon.png" />
 			<resource file="${basedir}/resources/user_16x16.png" />
+			<resource file="${basedir}/resources/users_16x16.png" />
 			<resource file="${basedir}/resources/settings_16x16.png" />
 			<resource file="${basedir}/resources/lock_go_16x16.png" />
 			<resource file="${basedir}/resources/lock_pull_16x16.png" />
@@ -698,9 +709,8 @@
 		<copy todir="${project.site.dir}">
 			<!-- Copy selected Gitblit resources -->
 			<fileset dir="${project.resources.dir}">
-				<include name="bootstrap.140.css" />
-				<include name="bootstrap.gb.css" />
-				<include name="markdown.css" />
+				<include name="bootstrap/**/*" />
+				<include name="gitblit.css" />
 				<include name="gitblt_25_white.png" />
 				<include name="gitblt-favicon.png" />
 				<include name="lock_go_16x16.png" />
@@ -846,13 +856,33 @@
 		<delete dir="${project.express.dir}" />
 	</target>
 
+	
+	<!--
+		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
+		Update the gh-pages branch with the current site
+		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	-->
+	<target name="updateGhPages" depends="buildSite">
+		<!-- Build gh-pages branch -->
+		<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildGhPages">
+			<classpath refid="master-classpath" />
+			<arg value="--sourceFolder" />
+			<arg value="${basedir}/site" />
+
+			<arg value="--repository" />
+			<arg value="${basedir}" />
+			
+			<arg value="--obliterate" />
+		</java>
+	</target>
+	
 
 	<!-- 
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 		Publish binaries to Google Code
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 	-->
-	<target name="publishBinaries" depends="buildGO,buildWAR,buildExpress,buildFederationClient,buildManager" description="Publish the Gitblit binaries to Google Code">
+	<target name="publishBinaries" depends="buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary" description="Publish the Gitblit binaries to Google Code">
 
 		<echo>Uploading Gitblit ${gb.version} binaries</echo>
 
@@ -925,7 +955,7 @@
 		You must add ext/commons-net-1.4.0.jar to your ANT classpath.
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 	-->
-	<target name="publishSite" depends="buildSite" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)" >
+	<target name="publishSite" depends="buildSite,updateGhPages" description="Publish the Gitblit site to a webserver (requires ext/commons-net-1.4.0.jar)" >
 
 		<echo>Uploading Gitblit ${gb.version} website</echo>
 
@@ -951,4 +981,4 @@
 		<delete dir="${project.war.dir}" />
 		<delete dir="${project.deploy.dir}" />
 	</target>
-</project>
+</project>

--
Gitblit v1.9.1