From cb285cbfddfc0b633d6b8cdb4dc0d2bd2b8b51ef Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 05 Jan 2012 17:34:05 -0500
Subject: [PATCH] Fixed bug in receive hook for repositories in subfolders

---
 build.xml |   39 +++++++++++++++++++++++++++++++++++----
 1 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/build.xml b/build.xml
index 8daebf1..c704046 100644
--- a/build.xml
+++ b/build.xml
@@ -181,11 +181,31 @@
 			</manifest>
 		</jar>
 
+		<!-- Gitblit library dependencies -->
+		<mkdir dir="${project.deploy.dir}/ext"/>
+		<copy todir="${project.deploy.dir}/ext">
+			<fileset dir="${basedir}/ext">
+				<exclude name="junit*.jar" />
+				<exclude name="commons-net*.jar" />
+				<exclude name="*-sources.jar" />
+				<exclude name="*-javadoc.jar" />
+			</fileset>
+		</copy>
+		
 		<!-- Build the docs for the deploy -->
 		<antcall target="buildDocs" inheritall="true" inheritrefs="true">
 			<param name="docs.output.dir" value="${project.deploy.dir}/docs" />
 		</antcall>
 		
+		<!-- Copy the supported Groovy hook scripts -->
+		<mkdir dir="${project.deploy.dir}/groovy" />
+		<copy todir="${project.deploy.dir}/groovy">
+			<fileset dir="${basedir}/groovy">
+				<include name="sendmail.groovy" />
+				<include name="jenkins.groovy" />
+			</fileset>
+		</copy>
+	
 		<!-- Create Zip deployment -->		
 		<zip destfile="${distribution.zipfile}">
 			<fileset dir="${project.deploy.dir}">
@@ -226,6 +246,7 @@
 				<!-- Copy Doc images -->
 				<fileset dir="${basedir}/docs">
 					<include name="*.png" />
+					<include name="*.gif" />
 				</fileset>
 			</copy>
 
@@ -343,7 +364,16 @@
 		<antcall target="buildDocs" inheritall="true" inheritrefs="true">
 			<param name="docs.output.dir" value="${project.war.dir}/WEB-INF/docs" />
 		</antcall>
-		
+
+		<!-- 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="sendmail.groovy" />
+				<include name="jenkins.groovy" />
+			</fileset>
+		</copy>
+
 		<!-- Build the WAR web.xml from the prototype web.xml and gitblit.properties --> 
 		<java classpath="${project.build.dir}" classname="com.gitblit.build.BuildWebXml">
 			<classpath refid="master-classpath" />
@@ -443,7 +473,7 @@
 		Build a Gitblit filesystem for deployment to RedHat OpenShif Expresst
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 	-->
-	<target name="buildOpenShift" depends="compile" description="Build exploded WAR file suitable for deployment to OpenShift Express">
+	<target name="buildExpress" depends="compile" description="Build exploded WAR file suitable for deployment to OpenShift Express">
 		<echo>Building Gitblit Express for RedHat OpenShift ${gb.version}</echo>
 		
 		<delete dir="${project.express.dir}" />
@@ -689,6 +719,7 @@
 			<!-- Copy Doc images -->
 			<fileset dir="${basedir}/docs">
 				<include name="*.png" />
+				<include name="*.gif" />
 				<include name="*.js" />
 			</fileset>
 		</copy>
@@ -809,7 +840,7 @@
 		Compile from source, publish binaries, and build & deploy site
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 	-->
-	<target name="buildAll" depends="buildGO,buildWAR,buildOpenShift,buildFederationClient,buildManager,buildApiLibrary,buildSite">		
+	<target name="buildAll" depends="buildGO,buildWAR,buildExpress,buildFederationClient,buildManager,buildApiLibrary,buildSite">		
 		<!-- Cleanup -->
 		<delete dir="${project.build.dir}" />
 		<delete dir="${project.war.dir}" />
@@ -823,7 +854,7 @@
 		Publish binaries to Google Code
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 	-->
-	<target name="publishBinaries" depends="buildGO,buildWAR,buildOpenShift,buildFederationClient,buildManager" description="Publish the Gitblit binaries to Google Code">
+	<target name="publishBinaries" depends="buildGO,buildWAR,buildExpress,buildFederationClient,buildManager" description="Publish the Gitblit binaries to Google Code">
 
 		<echo>Uploading Gitblit ${gb.version} binaries</echo>
 

--
Gitblit v1.9.1