I want to generate a properties file, from my ant script, that contains the svn version number of my project. I'm 1/3 of the way done:
To do this I need to:
use svnversion
1b. use
<svn><wcVersion></svn>
put the result in a .properties file that ends up in my build path
I'm a bit lost with 1a and 2. any ideas?
What I used is to execute
svn info --xml
, then loaded the resulted xml file using<XmlProperty>
task and in the end just replacing a token in the property file that is path of the build path.So something like this:
In
${info.entry.revision}
is the revision of the repository in the current dir.never mind, I got it working: