我正在研究Cruise Control,我希望在Cruise Control主屏幕上显示最终构建标签上的当前构建版本号。如何在下面的代码中动态传递修订
<labeller type="assemblyVersionLabeller">
<major>1</major>
<minor>0</minor>
<revisiom>547</revision>
<incrementOnFailure>false</incrementOnFailure>
</labeller>
我的msbuild脚本位于
之下<SvnCheckout RepositoryPath="$(SvnCheckoutPath)"
LocalPath="$(CheckOutPath)"
UserName="username"
Password="pass123">
<Output TaskParameter="Revision" PropertyName="Revision" />
</SvnCheckout>
当我调用这个脚本时,我得到了修订号。 所以如果我的构建成功,那么它应该出现在CCNET屏幕上的 LastBuildLabel 中。请建议如何解决这个问题。
答案 0 :(得分:0)
这是一种更简单的方法来显示SVN修订版。
In order to get this showing you need to edit the .xsl file used to display the summary page.
1. Open {$CC Installation Root}\webdashboard\xsl\header.xsl
2. Go to the bottom of the file and locate the "Last Log Entry" section. It should look like this.
<tr>
<td class="header-label" valign="top"><nobr>Last log entry:</nobr></td>
<td class="header-data"><pre><xsl:value-of select="comment"/></pre></td>
</tr>
3. Copy & Paste this section directly underneath it and edit is as shown here
<tr>
<td class="header-label" valign="top"><nobr>Last log entry:</nobr></td>
<td class="header-data"><pre><xsl:value-of select="comment"></pre></td>
</tr>
<tr>
<td class="header-label" valign="top"><nobr>SVN Revision:</nobr></td>
<td class="header-data"><pre><xsl:value-of select="changeNumber"/></pre></td>
</tr>
4. Save the changes to header.xsl
来自:
http://www.richard-banks.org/2007/01/add-subversion-revision-to.html