source: branches/1.1.x/build-snapshot.xml

Last change on this file was 13985, checked in by Mark Evenson, 12 years ago

build: 'abcl.snapshot' will introspect other possible DVCs for more version information.

Use case: I use Mercurial to snapshot the SVN trunk in order to manage
patch submission. I'd like to create a snapshot target that allows me
to more effciently package things with the appropiate metainformation
from my patche queues.

Only tested on Solaris oi-151a3.

TODO: generalize to other people's flavors of build enviroment (git,
darcs, etc.)

FIXME: Work through MSFT Windows kinks.

File size: 1.9 KB
Line 
1<project xmlns="antlib:org.apache.tools.ant">
2
3<target name="abcl.snapshot" 
4        depends="abcl.release,abcl.diagnostic,abcl.version"
5        description="Introspect and dump the current build and
6  (presumed ) runtime targets as binary executable JVM objects.">
7
8  <copy file="${dist.dir}/abcl-bin-${abcl.version}.tar.gz"
9        verbose="true"
10        toFile="${dist.dir}/abcl-bin-${abcl.src.version}.tar.gz"/>
11
12  <copy file="${dist.dir}/abcl-src-${abcl.version}.tar.gz"
13        verbose="true"
14        toFile="${dist.dir}/abcl-src-${abcl.src.version}.tar.gz"/>
15
16        <echo>
17abcl.version: ${abcl.version}
18abcl.version.hg: ${abcl.version.hg}
19abcl.src.version: ${abcl.src.version}
20
21</echo>
22</target>
23
24<target name="abcl.version" depends="abcl.stamp,abcl.version.hg"/>
25
26<!-- Introspect for other versioning systems if we haven't determined an upstream SVN version -->
27<target name="abcl.version.hg"
28        depends="abcl.stamp">
29  <exec executable="hg" 
30    outputproperty="abcl.version.hg.raw"
31    failifexecutionfails="false"
32    searchpath="true">
33        <arg value="id"/>
34        <arg value="--id"/>
35  </exec>
36
37  <property name="abcl.version.hg"
38            value="hg-${abcl.version.hg.raw}"/>
39  <property name="abcl.version"
40            value="${abcl.version.hg}"/>
41  <property name="abcl.src.version"
42            value="${abcl.version.hg}"/>
43</target>
44
45<!-- Writing the corresponding task for abcl.version.git.raw is an exercise left to the reader. -->
46
47
48<!-- FIXME Some macrology would be helpful as the basic rules seem obvious ?!? -->
49
50<target name="urn:org.abcl.build.ant.targets.diagnostic"
51        depends="abcl.release"/>
52
53<target name="snap" 
54        depends="abcl.snapshot"/>
55
56<target name="snapshot" 
57        depends="abcl.snapshot"/>
58
59<target name="org.not.abcl.build.ant.targets.diagnostic"
60        depends="abcl.diagnostic"/>
61
62<target name="org.not.abcl.build.ant.targets.snapshot"
63        depends="abcl.snapshot"/>
64
65</project>
Note: See TracBrowser for help on using the repository browser.