build.xml
changeset 4278 08f71f5da899
parent 4277 cf3dac4adfe7
child 4279 959b1cd36773
--- a/build.xml	Mon Jul 06 13:09:53 2009 +0200
+++ b/build.xml	Mon Jul 06 14:08:41 2009 +0200
@@ -845,4 +845,33 @@
     <chmod file="config/setup-properties-${osname}${osarch}.${bin.ext}" perm="+x" />
   </target>
 
+  <target name="package.core">
+    <exec executable="hg" outputproperty="hg.idno" failifexecutionfails="false">
+      <arg value="id"/>
+      <arg value="-n"/>
+    </exec>
+    
+    <taskdef name="CoreRevision" classname="org.openbravo.erpCommon.utility.CalculateCoreRevision">
+        <classpath refid="project.class.path" />
+      </taskdef>
+
+    <CoreRevision hgRevNo="${hg.idno}" revision="core.rev"/>
+    
+	<property name="tmpdir" value="${java.io.tmpdir}/ob.core${core.rev}" />
+   
+  	<exec executable="hg" >
+  		<arg value="archive"/>
+  		<arg value="${tmpdir}"/>
+  	</exec>
+  	
+  	<replaceregexp file="${tmpdir}/src-db/database/sourcedata/AD_MODULE.xml"
+                   match="(VERSION.*\[CDATA\[.*\..*\.)(.*)(\]\])"
+                   replace="\1${core.rev}\3"
+                   byline="true"/>
+    
+    <zip destfile="${basedir}/core-2.50.${core.rev}.obx" basedir="${tmpdir}"/>
+    
+    <delete dir="${tmpdir}"/>
+
+   </target>
 </project>