diff options
author | Paul Phillips <paulp@improving.org> | 2010-01-20 04:38:32 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-01-20 04:38:32 +0000 |
commit | 6dcfae7e8ddde4da972cd0dc077e95eec00d41ed (patch) | |
tree | 758acf6b843c1fe05f91195490a59428f60b3e50 | |
parent | 7ea84d354274fd6e100e92d120291aff49ee88d5 (diff) | |
download | scala-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.
-rwxr-xr-x | bin/git-get-rev | 2 | ||||
-rw-r--r-- | build.xml | 16 |
2 files changed, 11 insertions, 7 deletions
diff --git a/bin/git-get-rev b/bin/git-get-rev index abbdf61ebd..9adda35ca7 100755 --- a/bin/git-get-rev +++ b/bin/git-get-rev @@ -2,4 +2,4 @@ # GIT_PAGER=cat -git log -10 | grep git-svn-id | head -1 | cut -c 68-73 +git log -10 | grep git-svn-id | head -1
\ No newline at end of file @@ -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 --> |