Hi
as far as I know, there is no labeller foreseen that can handle this, but it is very easy to make one that does :-) Technical Information : http://www.cruisecontrolnet.org/attachments/download/10/customisingcruisecontrol-net.pdf an example of a custom labeller : http://rubenwillems.blogspot.com/2009/02/continous-installation-knowing-version.html for your scenario it's quit simple public void Run(ThoughtWorks.CruiseControl.Core.IIntegrationResult result) { result.Label = Generate(result); } This creates the label Generate is just a method that returns a string. but you have the integration result, and you have the integration result as an argument :-) IIntegrationResult has a boolean : hasModifications so if you only want to increase a number, this is all you need the full list of mods is also available Modification[] Modifications { get; set; } I would just copy the code of the default labeller, and tweak that to your needs. with kind regards Ruben Willems with kind regards Ruben Willems On 7 November 2011 21:16, Bradley Rosen <[email protected]> wrote: > To whom is may concern > > I am trying to increase the build number of a project, but only when > the source has changed (currently using git and pulling from github). > Right now i have a trigger block that runs every night and triggers > the project. I could break this up into 2 projects, where the > scheduleTrigger is in the same project as the pull from source > control, and the second is triggered by success of the first project. > Problem is that i still dont see how cruise control can detect if > there are no updates to the main repository on github, and not trigger > the second project if i break it up. Hope what im trying to do makes > sense and have added a template of the project block configuration i > am using where everything is all in one project block. > > Thanks in advance > Brad > > > <project name="test Continous Build"> > <labeller type="defaultlabeller"> > <initialBuildLabel>98</initialBuildLabel> > <prefix>5.6.4.</prefix> > <incrementOnFailure>true</incrementOnFailure> > <labelFormat>00</labelFormat> > </labeller> > <triggers> > <scheduleTrigger time="1:00" buildCondition="ForceBuild" > name="Scheduled" /> > </triggers> > <sourcecontrol type="git"> > <repository>[email protected]:p1l/p1.git</repository> > <branch>develop</branch> > <autoGetSource>true</autoGetSource> > <executable>C:\progra~2\git\cmd\git.cmd</executable> > <workingDirectory>C:\project</workingDirectory> > <!-- <commitBuildModifications>true</commitBuildModifications> > <commitUntrackedFiles>true</commitUntrackedFiles> > <tagOnSuccess>true</tagOnSuccess> > <tagCommitMessage>Automated git-commit: Updated build number to > {0}</tagCommitMessage> > <tagNameFormat>CCNet-Build-{0}</tagNameFormat> --> > </sourcecontrol> > <tasks> > <exec> > <!-- Increment assembly.info / build number block --> > </exec> > <msbuild> > <executable>C:\Windows\Microsoft.NET\Framework > \v4.0.30319\MSBuild.exe</executable> > <workingDirectory>C:\project</workingDirectory> > <projectFile>project.sln</projectFile> > <buildArgs>/p:Configuration=Release /v:diag</buildArgs> > <targets>Build</targets> > <timeout>2000</timeout> > </msbuild> > <exec> > <-- create MSI package block > </exec> > <exec> > <!-- deploy block --> > </exec> > </tasks> > </project> >
