Am 08.09.2011 17:01, schrieb Michael Schall:
We set the forth digit to 0 for the AssemblyVersion attribute and SVN
revision number for the AssemblyFileVersion attribute.  This way you can
slipstream fixes without breaking compatibility with other's code, but
you still have the revision number if you want it.


+1 so do we in office.

using nant for retreiving svn revision to property svn.revision:
use svn log (repository access)

<exec program="svn.exe" workingdir="${svnroot}" verbose="false"
      output="_svnrevision.xml" failonerror="true" >
    <arg value="log" />
    <arg line="${svnroot} --xml --limit 1 -q" />
    <arg line="--username=foo --password=bar --no-auth-cache" />
</exec>
<sleep milliseconds="500" />
<xmlpeek file="_svnrevision.xml"
         xpath="/log/logentry/@revision"
         property="svn.revision"
         failonerror="true"/>


or using svn info (without repository access, but should be updated before:

<exec program="svn.exe" workingdir="${svnroot}" verbose="false"
      output="_svnrevision.xml" failonerror="true" >
    <arg value="info" />
    <arg line="${svnroot} --xml" />
</exec>
<sleep milliseconds="500" />
<xmlpeek file="_svnrevision.xml"
         xpath="/info/entry/commit/@revision"
         property="svn.revision"
         failonerror="true"/>

hth

Dominik

--
The answer to the great question of life,
the universe and everything is 42 (Douglas Adams)

Reply via email to