2013-11-21 5 views
0

Я работаю над Cruise Control, и я хотел отобразить текущий номер ревизии сборки на Last Build Label, который отображается в главном экране круиз-контроля. Как пройти ревизию no динамически ниже кодКак установить svn Номер версии на последней строке Label на CruiseControl.net

<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> 

, когда я называю этот сценарий, то я получил номер версии. , поэтому, если моя сборка выполнена успешно, она должна появиться в LastBuildLabel на экране CCNET.please предложит, как решить эту проблему.

ответ

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

+0

я следовал, но ничего не change.pls дайте мне гильдия –

+0

ли сброс вы IIS? (Если это не имеет смысла, перезагрузите компьютер) – granadaCoder