Using the ANT build.number file

I was wondering how to keep track of how many builds have taken place, putting it together into a overall product version number with the Subversion Revision number.

It turns out that ANT actually keeps a record of builds itself using the Buildnumber task, all you have to do is produce a blank build.number file. If the build.number file is local to the build.xml you need no special attributes, ANT will update the build number for you.

<target name="buildnumber">
      
   <buildnumber/>
   <echo message="ANT Build number ${build.number}" />
      
</target>

How good is that? Marvellous I think is the word you need.

Cloudmark Desktop Banner

Related Blog Entries

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.9.001.