我已经在我的 CruiseControl.Net(版本:1.6.7981.1)服务器中配置了两个项目构建 - Continuous 和 nightly ,以构建相同的项目代码。
我从 TFS 服务器获取代码并将其存储在两个构建的同一工作目录中,并且我在两个项目构建中都应用了 assemblyVersionLabeller。
仅当修改存在且夜间构建 (forcebuild) 在凌晨 5:00 构建时,才会持续构建构建。
我的问题是:当夜间构建完成构建时,最后构建标签的修订号必须是连续构建修订号或更高版本。(即,如果我的连续构建标签是 1.0.125.23884,那么在夜间构建完成后,夜间构建标签必须是 xxx23884 或大于 23884,但小于 23875)。
我的 ccnet.config 看起来像这样:
<cruisecontrol>
<project name="Myproject-Continuous Build">
<triggers>
<intervalTrigger seconds="600" buildCondition="IfModificationExists"/>
</triggers>
<labeller type="assemblyVersionLabeller">
<major>1</major>
<minor>0</minor>
<incrementOnFailure>false</incrementOnFailure>
</labeller>
<sourcecontrol type="vsts" autoGetSource="true">
<server>server path</server>
<username>"username"</username>
<password>password</password>
<project>$Project/Source</project>
<workingDirectory>F:\WD</workingDirectory>
<cleanCopy>false</cleanCopy>
</sourcecontrol>
<tasks>
<msbuild>
<executable>C:\windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>F:\FD</workingDirectory>
<projectFile>"Project.sln"</projectFile>
<buildArgs>/p:Configuration=Debug /noconsolelogger /v:diag</buildArgs>
<targets>ReBuild</targets>
</msbuild>
</tasks>
</project>
<project name="Myproject-Nightly Build">
<triggers>
<scheduleTrigger time="5:00" buildCondition="ForceBuild"/>
</triggers>
<labeller type="assemblyVersionLabeller">
<major>1</major>
<minor>0</minor>
<incrementOnFailure>false</incrementOnFailure>
</labeller>
<sourcecontrol type="vsts" autoGetSource="true">
<server>server path</server>
<username>"username"</username>
<password>password</password>
<project>$Project/Source</project>
<workingDirectory>F:\WD</workingDirectory>
<cleanCopy>false</cleanCopy>
</sourcecontrol>
<tasks>
<msbuild>
<executable>C:\windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>F:\FD</workingDirectory>
<projectFile>"Project.sln"</projectFile>
<buildArgs>/p:Configuration=Debug /noconsolelogger /v:diag</buildArgs>
<targets>ReBuild</targets>
</msbuild>
</tasks>
</project>
</cruisecontrol>
求帮助 谢谢|GDG