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.
Thanks.
Stefan
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.
A minor change for this usecase I could think is to be able to use a
Xml-String for xmlpeek instead of requiring a file. So the timeout could
be removed and no additional file system access is needed.
So far Dominik
--
The answer to the great question of life,
the universe and everything is 42 (Douglas Adams)