|
Project Information
Members
Links
|
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. Important Update!I have essentially stopped development work on SVN Revision Labeller; I don't have as much time as I used to, and CC.NET's AssemblyVersionLabeller now does enough for me to use it in place of my own code. However, many thanks to Tess Ashpool, who has stepped into the breech, and forked into Github. This has the added benefit of allowing the community to work more actively on the code, without me being a roadblock on updates. For the future, please use https://github.com/neutmute/SvnRevisionLabeller. RequirementsMandatory
Optional
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: <labeller type="svnRevisionLabeller"> <major>7</major> <minor>11</minor> <url>svn://localhost/repository/trunk</url> </labeller> The following sample configuration shows the complete set of fields: <labeller type="svnRevisionLabeller">
<major>8</major>
<minor>2</minor>
<build>0</build>
<pattern>Prerelease {major}.{minor}.{build}.{revision}</pattern>
<incrementOnFailure>false</incrementOnFailure>
<resetBuildAfterVersionChange>false</resetBuildAfterVersionChange>
<url>https://localhost/repository/branches/dev-project</url>
<executable>C:\Svn\Bin\svn.exe</executable>
<username>ccnetuser</username>
<password>ccnetpassword</password>
<startDate>25/10/2010</startDate>
</labeller>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: <labeller type="svnRevisionLabeller"> <major>7</major> <minor>11</minor> <url>svn://localhost/repository/trunk</url> </labeller> and the latest Subversion revision number is 920, the CCNetLabel will be set to 7.11.0.920. 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 7.11.0.921, 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: <labeller type="svnRevisionLabeller">
<major>1</major>
<minor>2</minor>
<pattern>Labelling is as easy as {major} - {minor} - 3 - {revision}. See?</pattern>
<url>svn://localhost/repository/trunk</url>
</labeller>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:
History
|