我已經配置了兩個項目構建 - 連續和每晚在我的CruiseControl.Net(版本:1.6.7981.1)服務器上構建相同的項目代碼。Continuous和Nightly構建的最終構建標籤版本號不同
我從TFS服務器獲取代碼並將其存儲在相同的工作目錄中用於這兩個構建,並且我在這兩個項目構建中都應用了assemblyVersionLabeller。
只有存在修改並且夜間構建(forcebuild)在上午5:00構建時,纔會構建連續構建。
我的問題是:當每日構建完成建設,上次構建標籤的版本號必須是equels連續構建版本號或更高那麼(即如果我持續構建拉布勒是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>
Pleaes幫助 感謝| GDG
你說得對,但我只是在討論修訂版本號。 – GDG 2012-04-20 11:59:32
重點是:版本號不是由CCNET決定的,而是由您的VCS – 2012-04-20 12:31:08
在我們的具體情況下,我追查修訂號中包含的內容。我們有一個類似的配置:明確定義的主版本和次版本,由CCNET控制的版本號,由VCS控制的版本號(在我們的例子中是Seapine Surround)。版本號被確定爲構建觸發變更集中最近更改的一個源文件的VCS版本。所以修訂號似乎是某種隨意的,而實際上並不實用 – 2012-04-22 10:02:40