CC Revision Labeller is a plugin for CruiseControl.NET that allows you to generate CruiseControl labels for your builds, based upon the build and revision number of your Subversion working copy. This can be customised with a prefix and/or major/minor version numbers.
Labels follow the Microsoft versioning standard i.e Major.Minor.Build.Revision
Build Numbers are automatically incremented. Revision Number is pulled from the subversion working copy.
RequirementsCruiseControl.NET v1.3 - the plugin has been compiled and tested against this version of CC.NET. As such, it uses the .NET Framework 2.0, and is not backwards compatible with previous versions of CC.NET. If you cannot upgrade to this version of CC.NET and want to use this plugin, you can rebuild from the source code, but your will need to replace the solution and project files to work with Visual Studio 2003.
InstallationTwo builds are provided - Debug and Release. You should only need the Debug build if you are diganosing technical issues with the plugin. Just drop the contents of either src\ccnet.SvnRevisionLabeller.plugin\bin\Debug or src\ccnet.SvnRevisionLabeller.plugin\bin\Release into the folder that CruiseControl.NET is running from, update ccnet.config with the appropriate configuration (see below), and restart the service.
ConfigurationBelow is a sample configuration for svnRevisionLabeller, showing the mandatory fields:
The following sample configuration shows the complete set of fields:
When CruiseControl.NET begins a project build, it generates a label for the build and stores it in the property CCNetLabel - this property can then be used by NAnt or MSBuild to generate the AssemblyInfo.cs for your assemblies, so that CC.NET displays as its label the same version that the assemblies are built with. So, if the configuration for the labeller is set as: and the latest Subversion revision number is 920, the CCNetLabel will be set to 220.127.116.110.
Forcing a build without any changes to the repository will not increment the build number and it will stay as 18.104.22.1680.
A subsequent commit to the repository would then set the label to 22.214.171.1241, and so on. If a prefix is applied, that will need to be stripped from the label before creating AssemblyInfo.cs.
resetBuild allows one to reset their build numbers. This is useful when working on a new iteration or a new release.
Consider the case where the current label is 126.96.36.1990 This basically means that for 3.1 release we have created 43 builds. This build can be referenced in Subversion as revision number 1230. If one decides to now move to 3.2 - instead of incrementing the build number to 44 it makes sense to reset the build. To do this one will have to pass resetBuild as true and a build number.
In this case we will set it as one. On the next commit to the respository the label would be 188.8.131.521 telling everyone that this is the first build for the 3.2 release.
History1.0 - Released
Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.