How do I set the build number based on the Subversion revision number with CruiseControl.net [duplicate]

StackOverflow https://stackoverflow.com/questions/401234

  •  03-07-2019
  •  | 
  •  

Question

Possible Duplicate:
Use SVN Revision to label build in CCNET

I'm working through the process of installing CruiseControl.net and converting an Msbuild script to work with it. I'd like our build number to reflect the Subversion revision number. It appears as though the LastChangeLabeller should work, but all I get is "unknown".

My ultimate goal is to format the build number with both a build number (incrementing by 1) and the subversion revision. But for now I'd settle for the revision number.

Clarification: I'm trying to get the CruiseControl.Net build number updated. Not just the version numbers in the compiled results.

Was it helpful?

Solution

I found a duplicate question. Use svn revision to label build in ccnet. This lead me to svnRevisionLabeller available on Google Code

This seems to be the best solution for me. I modified the code slightly because I wanted the subversion revision number to be last number in the version number. major.minor.build.revision. This labeller by default does major.minor.revision.build.

OTHER TIPS

The MSBuild Community Tasks project has a subversion task which will aid you in this endeavor.

The tasks: http://msbuildtasks.tigris.org/servlets/ProjectDocumentList

Article describing components: http://weblogs.asp.net/pwelter34/archive/2006/03/31/441613.aspx

The SVN FAQ has an example of how to accomplish this using GNU make. I'm sure it can be easily adapted.

If you are wanting to change the build number in CC.Net, I believe you want to use a labeller block - possibly a Last Change labeller, though I've not used it myself.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top