[Mulgara-svn] r321 - trunk
ronald at mulgara.org
ronald at mulgara.org
Tue Jul 17 23:00:35 UTC 2007
Author: ronald
Date: 2007-07-17 18:00:34 -0500 (Tue, 17 Jul 2007)
New Revision: 321
Modified:
trunk/common.xml
Log:
Fixed extended version generation via 'svnversion': if no 'svnversion' or
'svnversion.exe' is found on the path, or if the execution of svnversion
fails, or if svnversion is run outside the working-copy, then set the extended
version to "local".
Modified: trunk/common.xml
===================================================================
--- trunk/common.xml 2007-07-17 19:45:02 UTC (rev 320)
+++ trunk/common.xml 2007-07-17 23:00:34 UTC (rev 321)
@@ -186,22 +186,32 @@
<taskdef classpathref="project-classpath" resource="axis-tasks.properties"/>
</target>
- <target name="get-svnext">
- <condition property="svnext" value="">
- <os family="unix"/>
+ <target name="svnversion" depends="run-svnversion">
+ <condition property="svn-version" value="${svnversion-output}">
+ <and>
+ <isset property="svnversion-output"/>
+ <not><equals arg1="${svnversion-output}" arg2="exported" trim="true"/></not>
+ </and>
</condition>
- <condition property="svnext" value=".exe">
- <os family="windows"/>
- </condition>
- <property name="svnext" value=""/>
+ <property name="svn-version" value="local"/>
</target>
- <target name="svnversion" depends="get-svnext">
- <exec executable="svnversion${svnext}" outputproperty="svn-version">
+ <target name="run-svnversion" depends="find-svnversion-exe" if="svnversion-exe">
+ <exec executable="${svnversion-exe}" outputproperty="svnversion-output"
+ failifexecutionfails="false">
<arg line="."/>
</exec>
</target>
+ <target name="find-svnversion-exe">
+ <property environment="env"/>
+
+ <available file="svnversion" filepath="${env.PATH}"
+ property="svnversion-exe" value="svnversion"/>
+ <available file="svnversion.exe" filepath="${env.PATH}"
+ property="svnversion-exe" value="svnversion.exe"/>
+ </target>
+
<!-- =================================================================== -->
<!-- Changes Mulgara Config files Database Class depending on Resolvers -->
<!-- =================================================================== -->
More information about the Mulgara-svn
mailing list