Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have written a NAnt build file that handles parsing SVN information and creating properties. I then use those property values for a variety of build tasks, including setting the label on the build. I use this target combined with the SVN Revision Labeller mentioned by lubos hasko with great results.</p> <pre><code>&lt;target name="svninfo" description="get the svn checkout information"&gt; &lt;property name="svn.infotempfile" value="${build.directory}\svninfo.txt" /&gt; &lt;exec program="${svn.executable}" output="${svn.infotempfile}"&gt; &lt;arg value="info" /&gt; &lt;/exec&gt; &lt;loadfile file="${svn.infotempfile}" property="svn.info" /&gt; &lt;delete file="${svn.infotempfile}" /&gt; &lt;property name="match" value="" /&gt; &lt;regex pattern="URL: (?'match'.*)" input="${svn.info}" /&gt; &lt;property name="svn.info.url" value="${match}"/&gt; &lt;regex pattern="Repository Root: (?'match'.*)" input="${svn.info}" /&gt; &lt;property name="svn.info.repositoryroot" value="${match}"/&gt; &lt;regex pattern="Revision: (?'match'\d+)" input="${svn.info}" /&gt; &lt;property name="svn.info.revision" value="${match}"/&gt; &lt;regex pattern="Last Changed Author: (?'match'\w+)" input="${svn.info}" /&gt; &lt;property name="svn.info.lastchangedauthor" value="${match}"/&gt; &lt;echo message="URL: ${svn.info.url}" /&gt; &lt;echo message="Repository Root: ${svn.info.repositoryroot}" /&gt; &lt;echo message="Revision: ${svn.info.revision}" /&gt; &lt;echo message="Last Changed Author: ${svn.info.lastchangedauthor}" /&gt; &lt;/target&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload