You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Andre Charbonneau <an...@nrc-cnrc.gc.ca> on 2005/04/29 17:19:05 UTC

extracting project revision number

Hi,
I would like to extract the Subversion build number of my project and 
use this to name my release files (tar.gz).  What I thought of doing is 
to put a Subversion tag in my build.properties file.  Something like the 
following:

build.revision="$Rev: 24 $"

That way, the build number will be in synch with my Subversion 
repository.  But my question is:  How do I extract this build number to 
use it in my build.xml tasks? (without the leading '$Rev' and trailing 
'$' characters).

Thanks,
    Andre


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: extracting project revision number

Posted by Brian Lalor <bl...@bravo5.org>.
On Apr 29, 2005, at 10:19 AM, Andre Charbonneau wrote:

> I would like to extract the Subversion build number of my project  
> and use this to name my release files (tar.gz).  What I thought of  
> doing is to put a Subversion tag in my build.properties file.   
> Something like the following:

I've written a task for ant that uses javasvn to examine the  
project's working copy and set some properties based on whether the  
WC is checked out from a tag, has uncommitted changes, etc.  I've not  
yet made this task available outside my organization, and it has some  
known flaws, but I find it works well for me.  If there's interest,  
I'll open it up.

-- 
    __   ____
   / /  / __/ Brian Lalor
  / _ \/__ \  blalor@bravo5.org
/_.__/____/  http://bravo5.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: extracting project revision number

Posted by Bill Rich <bi...@wilandra.com>.
<propertyregex> can be used to remove the unwanted parts.

HTH Bill

-----Original Message-----
From: Andre Charbonneau [mailto:andre.charbonneau@nrc-cnrc.gc.ca] 
Sent: Friday, April 29, 2005 8:19 AM
To: user@ant.apache.org
Subject: extracting project revision number

Hi,
I would like to extract the Subversion build number of my project and use
this to name my release files (tar.gz).  What I thought of doing is to put a
Subversion tag in my build.properties file.  Something like the
following:

build.revision="$Rev: 24 $"

That way, the build number will be in synch with my Subversion repository.
But my question is:  How do I extract this build number to use it in my
build.xml tasks? (without the leading '$Rev' and trailing '$' characters).

Thanks,
    Andre


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
commands, e-mail: user-help@ant.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org