CruiseControl.net — How to checkin code during the build

久未见 提交于 2019-12-03 07:48:34

问题


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.



来源:https://stackoverflow.com/questions/303511/cruisecontrol-net-how-to-checkin-code-during-the-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!