set cod.revision only in case it is a subversion working copy
authorAsier Lostalé <asier.lostale@openbravo.com>
Fri, 21 Nov 2008 08:43:02 +0000
changeset 2057 12a14c230fce
parent 2056 52856de9b823
child 2058 09f7ca291e10
set cod.revision only in case it is a subversion working copy
build.xml
--- a/build.xml	Fri Nov 21 08:33:40 2008 +0000
+++ b/build.xml	Fri Nov 21 08:43:02 2008 +0000
@@ -101,9 +101,8 @@
 	<property name="obx.export.CS" value="false"/>
 	<property name="chekPerms" value="false"/>
 	
-	<condition property="is.code.rev">
-		<isset property="code.revision"/>
-	</condition>
+	<available file=".svn/entries" property="is.svn"/>
+
 	
 	<condition property="mode.war">
 	  <equals arg1="war" arg2="${deploy.mode}"/>
@@ -149,6 +148,9 @@
       <isset property="env.JAVA_HOME"/>
     </not>
   </condition>
+	
+	<available file=".svn/entries" property="is.svn"/>
+			
 
   <path id="project.class.path">
     <pathelement path="${build}"/>
@@ -186,7 +188,13 @@
     <fail if="no.java.home" message="The environment variable JAVA_HOME is not set."/>
   </target>
 
-  <target name="code.rev" unless="is.code.rev">
+	<target name="code.rev" depends="set.code.rev">
+		<condition property="code.revision" value="${svn.entries}" else ="0">
+		  <isset property="svn.entries" />
+    </condition>
+	</target>
+	
+  <target name="set.code.rev" if="is.svn">
     <loadfile property="svn.entries" srcFile=".svn/entries" failonerror="false">
       <filterchain>
         <filterreader classname="org.apache.tools.ant.filters.HeadFilter">
@@ -198,12 +206,7 @@
         <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks" />
       </filterchain>
     </loadfile>
-    <condition property="code.revision" value="${svn.entries}" else ="0">
-      <and>
-        <isset property="svn.entries" />
-      </and>
-    </condition>
-  </target>
+	</target>
 
   <target name="compile.complete" depends="init">
     <ant dir="${base.src}" target="compile.complete" inheritAll="true" inheritRefs="true"/>
@@ -352,13 +355,14 @@
   </target>
 
   <target name="install.source" depends="init,code.rev">
-    <antcall target="database.lib"/>
+  	<echo message="${code.revision}"/>
+    <!--antcall target="database.lib"/>
     <ant dir="${base.db}" antfile="build-create.xml" target="create.database" inheritAll="true" inheritRefs="true"/>
     <antcall target="core.lib"/>
     <antcall target="wad.lib"/>
     <antcall target="trl.lib"/>
     <antcall target="compile.complete"/>
-    <antcall target="war"/>
+    <antcall target="war"/-->
   </target>
 
   <target name="eclipse.install.source" depends="init,code.rev">