Code Location:

Ohloh Project Analysis
Basic Information
Code Locations: 1
SCM Types: Subversion   
Files: 31
Lines Of Code: 12,642
Published On: May 28, 2013 (03:59 PM)
SVN Revision Labeller is a plugin for CruiseControl.NET (CC.NET) that allows you to generate version labels for your builds, based upon the revision number of your Subversion working copy. This can be customised with a prefix and/or major/minor version numbers. RequirementsMandatoryCC.NET 1.4.4 RC1 - the plugin has been compiled against 1.4.4 RC, and due to breaking changes in CC.NET, will not run on versions 1.4.3 and prior. If you cannot upgrade your version of CruiseControl.NET, please use the older v1.0.3 release; .NET Framework 2.0 - actually a requirement for CC.NET, but it doesn't hurt to state the obvious; Subversion client - hopefully you'll have this installed anyway as part of your CC.NET configuration OptionalVisual Studio 2008 - for building from source, debugging or adding new features; Visual Studio 2003 - if you're feeling brave, and want to recompile for .NET 1.1 and versions of CC.NET prior to 1.3. InstallationThe precompiled build provides a release build only. If you want to run a debug build, you will need to grab a copy of the source and build it yourself. Otherwise, just drop the file ccnet.SvnRevisionLabeller.plugin.dll into the CC.NET server folder. The CC.NET configuration will need to be updated, and the server optionally restarted (depending on your configuration). ConfigurationBelow is a sample configuration for svnRevisionLabeller, showing the mandatory fields: 7 11 svn://localhost/repository/trunk The following sample configuration shows the complete set of fields: 8 2 0 Prerelease {major}.{minor}.{build}.{revision} false false https://localhost/repository/branches/dev-project C:\Svn\Bin\svn.exe ccnetuser ccnetpassword UsageWhen 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: 7 11 svn://localhost/repository/trunk and the latest Subversion revision number is 920, the CCNetLabel will be set to Forcing a build without any changes to the repository will not make any changes to the label. A subsequent commit to the repository would then set the label to, and so on. If you want to generate a more complex label, you use the Pattern field. This contains a number of tokens for the Major, Minor, Build, Revision and Rebuilt numbers,and you can effectively create any label you want. For instance: 1 2 Labelling is as easy as {major} - {minor} - 3 - {revision}. See? svn://localhost/repository/trunk and the current revision is 4, then the generated build label be "Labelling is as easy as 1 - 2 - 3 - 4. See?" The available tokens are: {major} - the major build number {minor} - the minor build number {build} - the build number {revision} - the revision number {rebuild} - the number of times the build has been rebuilt (i.e. a forced build) History2.0.0.20990 FIX - now runs against CC.NET v1.4.4 RC2; NEW - greater control over the formatting of the build label (patch provided by fezguy); the prefix and postfix fields have been removed from configuration, since they are now replaced by the Pattern field, and by default, rebuilds are not counted. To reproduce the original behaviour of the plugin, you would want a Pattern similar to "{major}.{minor}.{revision}.{rebuilt}", so that successive forced builds without a new Subversion commit increments the version number by 1; FIX - the username and password attributes are swapped around (fix provided by Tony Mitchell); Now built against CC.NET v1.3, and tested against CC.NET v1.3 FIX - the revision number does not increase on successive builds if a prefix is specified (fix provided by Mike Usner); FIX - if no working copy exists, then the labeller will not be able to work out what the current revision is, and throw an exception (fix provided by Matteo Tontini); Built against CC.NET v1.1, and tested against CC.NET v1.1 and v2.0; initial public release;
File Name LOCs Language
--- ---
--- ---
--- ---
73 Other Languages
89 Other Languages
25 Other Languages