Open GoogleCodeExporter opened 8 years ago
Hi sorry wasn't clear how I could change this into A RFE.
Original comment by Krys...@gmail.com
on 16 Mar 2010 at 4:48
Plus one for this request. We typically name hotfix branches according to the
date on which they were created, and when it comes time to build a hotfix
branch using CruiseControl.NET we'd like the hotfix name we supply via the
CCNET dashboard to be used when the labeller is retrieving a revision number.
<labeller type="svnRevisionLabeller">
<pattern>r{revision}</pattern>
<url>svn://ourserver/branches/$[HotfixBranchName]/src/sln/sln_Master</url>
</labeller>
Original comment by objec...@gmail.com
on 15 Sep 2010 at 9:35
Here's a fixed .cs file for anyone that wants to recompile. It has both support
for the dynamic properties, and also fixed the rebuild bug.
sample working after fix:
<labeller type="svnRevisionLabeller">
<major>2</major>
<minor>0</minor>
<build>2</build>
<pattern>{major}.{minor}.{build}.{revision}.{rebuild}B</pattern>
<incrementOnFailure>false</incrementOnFailure>
<executable>C:\Program Files\SlikSvn\bin\svn.exe</executable>
<url>svn://sample/</url>
<dynamicValues>
<directValue parameter="MajorVersion" property="major" />
<directValue parameter="MinorVersion" property="minor" />
<directValue parameter="SubVersion" property="build" />
</dynamicValues>
</labeller>
<parameters>
<numericParameter name="MajorVersion">
<description>Major Version Label</description>
<minimum>2</minimum>
<default>2</default>
</numericParameter>
<numericParameter name="MinorVersion">
<description>Minor Version Label</description>
<minimum>0</minimum>
<default>0</default>
</numericParameter>
<numericParameter name="SubVersion">
<description>Sub Version Label</description>
<minimum>0</minimum>
<default>3</default>
</numericParameter>
<selectParameter name="targetDeployment">
<description>Targeted Deployment Server</description>
<allowedValues>
<value name="nightly">Nightly</value>
<value name="dev">Development</value>
</allowedValues>
</selectParameter>
</parameters>
Original comment by seiggy2k
on 10 Nov 2010 at 9:12
Attachments:
here's the patch file for those that prefer using svn patch
Original comment by seiggy2k
on 10 Nov 2010 at 9:38
Attachments:
We had a problem with version 2.0.x.x where our rebuild numbers stopped
resetting after a successful build, once we upgraded to CC.NET 1.5. I figured
a new version of the labeler would solve it and then I found this issue and
comment #3 that says it fixes the rebuild reset issue. But after pulling,
patching, building and debugging I found that our problem was that the regex is
case sensitive and all of our patterns are like
'{Major}.{Minor}.{Revision}.{Rebuild}'. So the regex wouldn't match
(match.success = false) and then trying to access the group named 'major' would
result in 'System.FormatException: Input string was not in a correct format.'
because accessing an non-existent group's value returns string.Empty and
Convert.ToInt32 barfs on that.
I could have solved the problem by just changing our ccnet.config file pattern
elements, but you'll notice our pattern doesn't contain a {build} element, so
we would have gotten the same error on the line that accesses that one. So I
changed the way that the parsing works a little bit to be more tolerant of
casing of the pattern and missing pattern elements. Attached are patch and
full source files that include the patches provided by seiggy2k in comment #4,
plus the changes I describe above.
Original comment by dgorto...@gmail.com
on 18 Nov 2010 at 4:51
Attachments:
Original issue reported on code.google.com by
Krys...@gmail.com
on 16 Mar 2010 at 4:43