views:

18

answers:

1

Hi all. This is a question I should ask like a year earlier.

Back to the day, I setup cruisecontrol.NET 1.4.2.14 as our continuous integration system. I wanted to add the source revision number and the revision number of the binary it built. However, since it restarted automatically if any of external files and environment variable including by ccnet.config modified, I can't find a way to edit the title of the build informing e-mail while not making my cruisecontrol.NET restart.

Somehow I solved the problem in a crapy way, not worth to mention. Now it is time to make things right.

Any help is appreciated. Thanks in advance.

A: 

It is not totally clear what you want to do, but you can extract the revision information as XML (here from Subversion):

<!-- Extract Subversion revision information as XML. -->
<target name="revisionstamp">
    <property name="_target" value="${TmpDir}/svn.xml"/>
    <exec
        program="${Svn}"
        output="${_target}">
        <arg value="info"/>
        <arg value="--xml"/>
        <arg file="${BaseDir}"/>
    </exec>
</target>

and then extract the revsion number from the XML:

<xmlpeek
    file="${TmpDir}/svn.xml"
    xpath="/info/entry/@revision"
    property="revision"/>

Finally, use ${revision} to construct whatever filename or directory you want.

JPS