views:

881

answers:

2

Is there any way I can have access to the CruiseControl.NET's build label number? (Maybe by using a batch file.) Basically, I want to retrieve the value "LastSuccessfulIntegrationLabel" and use in a batch file before building.

+1  A: 

sure it is in the state file. Here is how I do it in PowerShell

$xml = [xml](gc $statefile)

[string]$buildnum =$xml.IntegrationResult.Label
Alex
+5  A: 

Can't you simply use the CCNetLabel environment variable in your batch script (see http://confluence.public.thoughtworks.org/display/CCNET/Executable+Task, at the bottom)?

If you need it before the build, you can set your batch to run as a <prebuild> task: http://confluence.public.thoughtworks.org/display/CCNET/Project+Configuration+Block

Igor Brejc
actually Status just returns success/fail not the label as the OP asks for
Alex
In think you meant CCNetLabel, the environment variable way
Alex
Yes, that's what I meant
Igor Brejc