From 746aaf82146a8621523004eebeb348766f611674 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 11 Jan 2012 16:18:02 -0500
Subject: [PATCH] Update the gh-pages branch on release with the built site

---
 build.xml |   22 +++++++++++++++++++++-
 1 files changed, 21 insertions(+), 1 deletions(-)

diff --git a/build.xml b/build.xml
index 0d906ed..7bb09cf 100644
--- a/build.xml
+++ b/build.xml
@@ -857,6 +857,26 @@
 		<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>
+	
 
 	<!-- 
 		~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -936,7 +956,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>
 

--
Gitblit v1.9.1