diff options
author | Paul Phillips <paulp@improving.org> | 2010-01-19 19:28:17 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-01-19 19:28:17 +0000 |
commit | c19a721704d7c9282f59b1f91e52df9c630fd831 (patch) | |
tree | 84a36d890923df8da0ca0fb11bc3205bef87498e /build.xml | |
parent | 4ed1910b1d36e6a2b4707a26374124d8faecc53e (diff) | |
download | scala-c19a721704d7c9282f59b1f91e52df9c630fd831.tar.gz scala-c19a721704d7c9282f59b1f91e52df9c630fd831.tar.bz2 scala-c19a721704d7c9282f59b1f91e52df9c630fd831.zip |
Until now all scala builds performed not in an ...
Until now all scala builds performed not in an svn tree were given no
version number, because the version was extracted from "svn info". Now
it tries git style if svn info is unrevealing. Review by community.
Diffstat (limited to 'build.xml')
-rw-r--r-- | build.xml | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -213,16 +213,34 @@ INITIALISATION <condition property="os.win"> <os family="windows"/> </condition> - <!-- Finding out SVN revision --> + <!-- Finding out SVN revision, svn style --> <exec executable="svn" outputproperty="svn.out" failifexecutionfails="false"> <arg line=" info ${basedir}"/> </exec> <propertyregex - property="svn.number" input="${svn.out}" select="\1" + property="svn.number.svn" input="${svn.out}" select="\1" regexp="Revision: ([0-9]+)" defaultValue="0"/> + + <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> + </then> + </if> + <!-- if svn failed and git succeeded, this will be ignored. --> + <property name="svn.number" value="${svn.number.svn}" /> + <echo message="SVN says ${svn.number.svn}" /> + <echo message="GIT says ${svn.number.git}" /> + <echo message="FINAL says ${svn.number}" /> + <property name="init.avail" value="yes"/> + <!-- Generating version number --> <property file="${basedir}/build.number"/> <property |