views:

687

answers:

2

I'm setting up CruiseControl.NET and during the build I want to modify my version.txt file and have it checked in. When I do this, CruiseControl.NET doesn't know this checkin was done by the build and so the next time it checks sources, it sees there were modifications and rebuilds again (I have IfModificationExists set in the project build). How do I tell CruiseControl.NET to check this file in or let it know that this one is OK so it doesn't keep re-triggering builds?

A: 

I'm not using Subversion, i'm using TFS.

Version.txt contains "1.0.5.3" which is the current build number. When someone checks out to build, they'll use 1.0.5.3 as their revision. On the server, it will rev the build number, store it in version.txt and check it back in so that everyone's version is moved up to that level. So it will be 1.0.5.4" for example.

I basicaly want a way to tell CCNet to checkin a file and ignore it when looking for future modifications.

The answer provided by g is the correct one. Using exclusion filters in a filtered source control block is the right way to do this.
Scott Dorman
+5  A: 

You can use exclusionFilters in the project to exclude the version.txt file from triggering a build.

<sourcecontrol type="filtered">
    <sourceControlProvider type="svn">
       ...        
    </sourceControlProvider>
    <exclusionFilters>
        <pathFilter>
            <pattern>**/Version.txt</pattern>
        </pathFilter>
    </exclusionFilters>
</sourcecontrol>

Documentation is available at:

http://confluence.public.thoughtworks.org/display/CCNET/Filtered+Source+Control+Block

g .
Convenient link: http://confluence.public.thoughtworks.org/display/CCNET/Filtered+Source+Control+Block .
Mattias Andersson
Using the filtered source control block with exclusion filters is the right solution.
Scott Dorman