summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-01-20 04:38:32 +0000
committerPaul Phillips <paulp@improving.org>2010-01-20 04:38:32 +0000
commit6dcfae7e8ddde4da972cd0dc077e95eec00d41ed (patch)
tree758acf6b843c1fe05f91195490a59428f60b3e50 /build.xml
parent7ea84d354274fd6e100e92d120291aff49ee88d5 (diff)
downloadscala-6dcfae7e8ddde4da972cd0dc077e95eec00d41ed.tar.gz
scala-6dcfae7e8ddde4da972cd0dc077e95eec00d41ed.tar.bz2
scala-6dcfae7e8ddde4da972cd0dc077e95eec00d41ed.zip
Took a slightly different tack on parsing the s...
Took a slightly different tack on parsing the svn version. No review.
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml16
1 files changed, 10 insertions, 6 deletions
diff --git a/build.xml b/build.xml
index c19f217cae..3ac90b57b5 100644
--- a/build.xml
+++ b/build.xml
@@ -213,7 +213,7 @@ INITIALISATION
<condition property="os.win">
<os family="windows"/>
</condition>
- <!-- Finding out SVN revision, svn style -->
+ <!-- Finding out SVN revision, svn style -->
<exec executable="svn" outputproperty="svn.out"
failifexecutionfails="false">
<arg line=" info ${basedir}"/>
@@ -223,18 +223,22 @@ INITIALISATION
regexp="Revision: ([0-9]+)"
defaultValue="0"/>
+ <!-- Both clauses of the conditional set svn.number -->
<if>
<equals arg1="${svn.number.svn}" arg2="0" />
<then>
<!-- Finding SVN revision, git style -->
<exec executable="bin/git-get-rev" outputproperty="svn.number.git" failifexecutionfails="false" />
- <condition property="svn.number" value="${svn.number.git}" >
- <isset property="svn.number.git" />
- </condition>
+ <propertyregex
+ property="svn.number" input="${svn.number.git}" select="\1"
+ regexp="\D*?(\d+)"
+ defaultValue="0"/>
</then>
+ <else>
+ <property name="svn.number" value="${svn.number.svn}" />
+ </else>
</if>
- <!-- if svn failed and git succeeded, this will be ignored. -->
- <property name="svn.number" value="${svn.number.svn}" />
+
<property name="init.avail" value="yes"/>
<!-- Generating version number -->