diff options
-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 --> |