Versioning Nightly Builds with NAnt and CC.Net


I’ve been trying to set up a continuous integration environment using NAnt, and CC.Net, but I did’nt know the best option to synchonize the AssemblyVersion.cs, the CC Label, and the versions tasks of NAnt. This article http://bitarray.co.uk/marc/archive/2004/08/17/273.aspx proposes a very  elegant solution for this problem

Comments (3)

  1. uwe says:

    Searched all over google and the article you refered to: where is the link to that "CC.NET"-Thing???

  2. Josh says:

    I disagree with the theme of the article. I ended up rolling my own small app to do three things. 1. Get the current version number. 2. Increment the number. 3. Write the new version number. Within my nAnt build script I get the "master" assembly’s version. Then I increment it and set all my other assemblies to match. We do this because we have release numbers that differ. For instance, we have a Maint build and a Dev build going on at the same time (and they use the same build script)–their build numbers are 2.8 and 2.9 right now.

    Build number 300 doesn’t mean as much to me as having a build number of 2.8.0.132 and a corresponding label of the same name. I would prefer to be able to correlate a label into CC.Net. Moreover, looking in CVS, I would be very confused to see a branch label of 1 and a main-trunk label of 1. I need more versioning information. I haven’t used the assem nAnt directive, but I will definately investigate to see if I can do the same thing I already do using this command. It may also be a great way for me to remove and add unit testing for debug/production builds.