Re: Forth digit in version number

2011-09-21 Thread Michael Schall
I think it would be beneficial to add the svn url (with revision) to
the assembly description then so this information is available to the
end user.

On Wed, Sep 21, 2011 at 3:51 AM, Stefan Bodewig bode...@apache.org wrote:
 Hi all,

 after playing with it I was faced with a compiler warning about the
 format.  Standard version formats require the numbers to be unsigned
 shorts whose range the ASF's svn revisions have long left behind.

 The result is not only a warning that we could ignore but also a version
 number that is not really predictable (could be a modulo operation, in
 either case it does not show the 1.1 million number that would
 correspond to the revision).

 We'll stick with .0 for now.

 Stefan



Re: Forth digit in version number

2011-09-12 Thread Dominik Guder

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)


Re: Forth digit in version number

2011-09-12 Thread Stefan Bodewig
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


Re: Forth digit in version number

2011-09-08 Thread Dominik Guder

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)


Re: Forth digit in version number

2011-09-08 Thread Stefan Bodewig
On 2011-09-08, Michael Schall wrote:

 Interesting.  How do you integrate this with your build process?

 I can give you specifics if you want, but we use MSBuild and MSBuild
 Community Tasks (http://msbuildtasks.tigris.org/)...

 We have a target that uses the SvnInfo task to find the SubersionRevision
 and RepositoryPath properties, and use the FileUpdate task update the
 AssemblyInfo files as needed.

I see.  For our NAnt build Dominik's response should point me into the
best direction.

Thanks

Stefan


Re: Forth digit in version number

2011-09-08 Thread 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


Forth digit in version number

2011-09-07 Thread Stefan Bodewig
Hi,

I don't expect us to release betas or any other kind of two releases
that would only differ in the forth digit of the version number.  So we
could simply set it to 0 (which I think currently happens in trunk,
didn't check).

Right now I'm afraid I won't be able to build all binaries on the same
machine so .* would result in different versions depending on the
platform.

An alternative would be to use the svn revision number.

Other ideas?

Stefan