src/build.xml
changeset 15752 b82a1d5eabd1
parent 15451 607dccd3524a
child 15962 541a4becfc84
--- a/src/build.xml	Wed Mar 07 10:39:18 2012 +0100
+++ b/src/build.xml	Wed Mar 07 15:09:50 2012 +0100
@@ -347,9 +347,19 @@
 		  <available file="${basedir}/config/instance.revision"/>
 	    </and>
 	  </condition>
+	  <condition property="revision.not.found">
+		<and>
+		  <not>
+		 	<isset property="hg.id"/>
+		  </not>
+		  <not>
+		  	<available file="${basedir}/config/instance.revision"/>
+		  </not>
+	    </and>
+	  </condition>
 	  <antcall inheritall="true" target="calculate.instance.version"/>
 	</target>
-	<target name="calculate.instance.version" depends="calculate.version.from.hg, calculate.version.from.file">
+	<target name="calculate.instance.version" depends="calculate.version.from.hg, calculate.version.from.file, cannot.find.version">
 	    <sql driver="${bbdd.driver}" url="${bbdd.owner.url}" userid="${bbdd.user}" password="${bbdd.password}" delimiter="/">
 	      <classpath>
 	        <fileset dir="${base.lib}">
@@ -368,7 +378,10 @@
 	  <property name="instance.version" value="${hg.id}"/>
 	</target>
 	<target name="calculate.version.from.file" if="revision.from.file">
-		<loadfile property="instance.version" srcfile="${basedir}/config/instance.revision"/>
+	  <loadfile property="instance.version" srcfile="${basedir}/config/instance.revision"/>
+	</target>
+	<target name="cannot.find.version" if="revision.not.found">
+	  <property name="instance.version" value=" - "/>
 	</target>
 
   <target name="compile.src.gen" depends="init">