On 2011-09-12, Dominik Guder wrote:

> Am 09.09.2011 05:52, schrieb Stefan Bodewig:
>> On 2011-09-08, Dominik Guder wrote:

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

>> It is likely fair to assume that whoever uses NAnt also has a svn
>> command line client around - or I need to provide some sort of fallback
>> if it isn't.

> Hi Stefan, since we are using CC.Net as CI and build tool svn.exe is
> required on our buildserver. The only point we need assembly
> versioning. Another solution could be tortoisesvn.net
> subwcrev.exe. See
> http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev.html
> Using #svn and create a svn nant task is possible, but currently out
> of scope for me.

Well, in our case I think - at least for now - I can simply limit it to
command line svn because it is going to be available on the machine that
builds the release binaries.

We want people to be able to build log4net from the source package
downloaded from our website.  In this case the extracted tree doesn't
have any svn information at all (in fact it doesn't correspond to a
revision number at all if local changes have been made) and the build
file has to cater for this.

I'll try to set up something that uses svn.exe to determine the
information I want and uses 0 as forth digit and an URL of "unknown
revision of <log4net_trunk_url_here>" as fallback.

Stefan

Reply via email to