source: tags/loci-tools-4.1.1/components/common.xml @ 5728

Revision 5728, 2.2 KB checked in by melissa, 11 years ago (diff)

4.1.1 release of LOCI Tools

Line 
1<!--
2common.xml
3
4Ant build file for logic common to every component.
5All component build files inherit from this build file.
6Download Apache Ant from http://ant.apache.org/.
7Type "ant -p" for a list of targets.
8-->
9
10<project>
11  <import file="${root.dir}/global.xml"/>
12  <property file="${root.dir}/components/common.properties"/>
13
14  <!-- Main build targets -->
15
16  <target name="clean" description="remove all build files except artifacts">
17    <delete dir="${build.dir}"/>
18  </target>
19
20  <!-- Internal build targets -->
21
22  <target name="init-timestamp">
23    <tstamp>
24      <format property="DATE" pattern="d MMMMM yyyy"/>
25      <format property="YEAR" pattern="yyyy"/>
26    </tstamp>
27  </target>
28
29  <target name="init-revision">
30    <!-- determine SVN revision number -->
31    <if>
32      <isset property="svn.revision"/>
33      <else>
34        <!--
35        Thanks to Chris Collins for this code snippet:
36          http://ccollins.wordpress.com/2008/01/30/
37            getting-subversion-revision-in-ant/
38        -->
39        <exec executable="svn" outputproperty="svn.log"
40          failifexecutionfails="false">
41          <arg line="info ${basedir}"/>
42        </exec>
43        <if>
44          <isset property="svn.log"/>
45          <then>
46            <propertyregex property="svn.revision"
47              input="${svn.log}" select="\1">
48              <regexp pattern="Revision: ([0-9]*)"/>
49            </propertyregex>
50            <!--<echo>SVN revision: ${svn.revision}</echo>-->
51          </then>
52        </if>
53      </else>
54    </if>
55  </target>
56
57  <target name="init-release">
58    <exec executable="svn" outputproperty="release.version"
59      failifexecutionfails="false">
60      <arg line="info ${basedir}"/>
61    </exec>
62    <propertyregex property="svn.root" input="${release.version}" select="\1">
63      <regexp pattern="Repository Root: (.*)"/>
64    </propertyregex>
65    <propertyregex property="release.version" override="true"
66      input="${release.version}" select="\1">
67      <regexp pattern="URL: ${svn.root}/(.*)/components/(.*)"/>
68    </propertyregex>
69    <propertyregex property="release.version" override="true"
70      input="${release.version}" regexp="branches/(.*)" replace="stable \1"
71      defaultValue="trunk"/>
72  </target>
73
74</project>
Note: See TracBrowser for help on using the repository browser.