Author: jhm
Date: Wed Feb 28 19:40:02 2018
New Revision: 1825596

URL: http://svn.apache.org/viewvc?rev=1825596&view=rev
Log:
new target for updating the (online)manual from Ant's git-repo

Modified:
    ant/site/ant/build.xml

Modified: ant/site/ant/build.xml
URL: 
http://svn.apache.org/viewvc/ant/site/ant/build.xml?rev=1825596&r1=1825595&r2=1825596&view=diff
==============================================================================
--- ant/site/ant/build.xml (original)
+++ ant/site/ant/build.xml Wed Feb 28 19:40:02 2018
@@ -84,6 +84,37 @@
                  encoding="iso-8859-1" outputencoding="utf-8"/>
     </target>
 
+    <target name="update-manual" description="Updates the manual from git 
repository" xmlns:if="ant:if" xmlns:unless="ant:unless">
+        <property name="ant.git-repo.location" 
location="../../git-repo-ant-core" description="Location of the local copy of 
the git-repo 'ant-core'"/>
+        <property name="ant.git-repo.url" 
value="https://git-wip-us.apache.org/repos/asf/ant.git"/>
+
+        <available property="git-repo.present" 
file="${ant.git-repo.location}/manual/inputhandler.html"/>
+
+        <echo if:set="git-repo.present" message="Found Ant git-repo at 
${ant.git-repo.location}, so using that. It's your job to have it uptodate."/>
+        <echo unless:set="git-repo.present" message="No Ant git-repo present. 
Cloning it into ${ant.git-repo.location}"/>
+        <exec unless:set="git-repo.present" executable="git" taskname="git">
+            <arg value="clone"/>
+            <arg value="${ant.git-repo.url}"/>
+            <arg value="${ant.git-repo.location}"/>
+        </exec>
+
+        <echo>Copying manual from 1.9.x branch</echo>
+        <exec executable="git" taskname="git" dir="${ant.git-repo.location}">
+            <arg line="checkout 1.9.x"/>
+        </exec>
+        <copy todir="production/manual-1.9.x">
+            <fileset dir="${ant.git-repo.location}/manual"/>
+        </copy>
+
+        <echo>Copying manual from master branch</echo>
+        <exec executable="git" taskname="git" dir="${ant.git-repo.location}">
+            <arg line="checkout master"/>
+        </exec>
+        <copy todir="production/manual">
+            <fileset dir="${ant.git-repo.location}/manual"/>
+        </copy>
+    </target>
+
     <target name="docs" if="AnakiaTask.present" depends="anakia,fixcrlf" 
description="Create XDocs.">
     </target>
 


Reply via email to