Title: Trying to auto increment my build number

I need some advice on the best way to auto-increment my build number.

I have taken a look at the <version> task in the nantcontrib project, but that is not what I am looking for.  I am looking for simple ability to do arithmetic.

I want to take a property (which is a number), add one to it so that I can use it in other places within my build script.

I want to use <xmlpeek> and <xmlpoke> to read and persist the small xml file that represents my projects build version.  It looks like this…

<buildversion>
  <major>3</major>
  <minor>2</minor>
  <bugfix>0</bugfix>
  <build>75</build>
</buildversion>

So after executing my build script, the xml would look like this

<buildversion>
  <major>3</major>
  <minor>2</minor>
  <bugfix>0</bugfix>
  <build>76</build>
</buildversion>

I have attached a sample build file to indicate the things I would like to do.

Anyone have any advice in what would be the best way to solve this problem?  Is the <script> task applicable for this situation?

Thanks,
Jason


<<buildversion.xml>> <<test.build>>

<buildversion>
  <major>3</major>
  <minor>2</minor>
  <bugfix>0</bugfix>
  <build>75</build>
</buildversion>

Attachment: test.build
Description: test.build



Reply via email to