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. […]
August 8, 2007 7:38 am

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.

Leave a Comment

Login
Log in below to access your courses.
Log In With Google
Forgot Password
Enter your email address or username and we’ll send you instructions to reset your password.