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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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://www.cruisecontrolnet.org/projects/ccnet/wiki/Filtered
回答2:
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.