Hello Andre, Assuming we have a file called build.number that contains the single line: build.revision="$Rev: 24 $" here is a sample snippet that will might help you:
<project> <taskdef resource="net/sf/antcontrib/antlib.xml"/> <loadfile property="line" srcfile="build.number"/> <echo>${line}</echo> <propertyregex property="version" input="${line}" regexp="\d+" select="\0"/> <echo>$${version} = ${version}</echo> </project> Here we use propertyregex task[2] from ant-contrib[1]. HTH Ivan [1]http://ant-contrib.sourceforge.net/ [2]http://ant-contrib.sourceforge.net/tasks/tasks/propertyregex.html --- Andre Charbonneau <[EMAIL PROTECTED]> wrote: > 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: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]