Skip to content
Permalink
Browse files
update
  • Loading branch information
Jan Matèrne committed Jun 3, 2014
1 parent e6fbc89 commit f293423b1f69f15fd9849879a79edd8614443e1c
Showing 1 changed file with 30 additions and 17 deletions.
@@ -32,27 +32,40 @@ The original of this snippet is maintained in the antlib-common project.

<property name="antlib.common.git" value="https://git-wip-us.apache.org/repos/asf/ant-antlibs-common.git"/>
<property name="git" value="git"/>

<property name="antunit.version" value="1.3"/>
<property name="antunit.url" value="http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/${antunit.version}/ant-antunit-${antunit.version}.jar"/>
<property name="antunit.file" value="ant-antunit.jar"/>

<available property="common.present" file="common" type="dir"/>
<available property="common.present" file="common" type="dir"/>
<available property="antunit.present" file="${antunit.file}"/>

<echo message="cloning antlib-common" unless:set="common.present"/>
<exec executable="${git}" taskname="git" unless:set="common.present">
<arg value="clone"/>
<arg value="${antlib.common.git}"/>
<arg value="common"/>
</exec>
<target name="clone-common" unless="common.present">
<echo message="cloning antlib-common"/>
<exec executable="${git}" taskname="git">
<arg value="clone"/>
<arg value="${antlib.common.git}"/>
<arg value="common"/>
</exec>
</target>

<echo message="updating antlib-common" if:set="common.present"/>
<exec executable="${git}" dir="common" taskname="git" if:set="common.present">
<arg value="pull"/>
</exec>
<target name="update-common" if="common.present">
<echo message="updating antlib-common"/>
<exec executable="${git}" dir="common" taskname="git">
<arg value="pull"/>
</exec>
</target>

<echo>updating prepare.xml</echo>
<copy file="common/prepare.xml" tofile="prepare.xml"/>
<target name="update-prepare-script">
<echo>updating prepare.xml</echo>
<copy file="common/prepare.xml" tofile="prepare.xml"/>
</target>

<echo>updating AntUnit</echo>
<property name="antunit.version" value="1.3"/>
<property name="antunit.url" value="http://repo1.maven.org/maven2/org/apache/ant/ant-antunit/${antunit.version}/ant-antunit-${antunit.version}.jar"/>
<get src="${antunit.url}" dest="ant-antunit.jar" usetimestamp="true"/>
<target name="get-antunit" unless="antunit.present">
<echo>updating AntUnit</echo>
<get src="${antunit.url}" dest="${antunit.file}" usetimestamp="true"/>
</target>

<target name="update" depends="clone-common,update-common,update-prepare-script,get-antunit"/>

</project>

0 comments on commit f293423

Please sign in to comment.