Add --tags to git describe to we pick up the 2.4 tag
[potlatch2.git] / build.xml
index 66c43c3..9bf885b 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -20,6 +20,7 @@
   <target name="git-buildnumber" description="Store output from git-describe in ${buildnumber}" if="git.present">
     <exec outputproperty="build_number" executable="git" dir="${basedir}">
       <arg value="describe" />
+      <arg value="--tags" />
     </exec>
   </target>
 
   </target>
 
   <!-- delete and create the DEPLOY dir again -->
-  <target name="init" depends="git-buildnumber,svn-buildnumber,deployLocales">
+  <target name="build-number" depends="git-buildnumber,svn-buildnumber">
     <echo>Build Number ${build_number}</echo>
     <copy file="version.as.template" tofile="version.as" overwrite="true" />
     <replace file="version.as" token="@@@buildnumber@@@" value="${build_number}" />
   </target>
 
+  <target name="init" depends="build-number, deployLocales">
+  </target>
+
+  <target name="init-no-locales" depends="build-number">
+  </target>
+
   <!-- Build and output potlatch2.swf in debug mode -->
   <target name="debug" depends="init">
     <mxmlc file="potlatch2.mxml">
     </mxmlc>
   </target>
 
+  <target name="debug-no-locales" depends="init-no-locales">
+    <mxmlc file="potlatch2.mxml">
+      <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
+      <load-config filename="debug-config.xml"/>
+      <source-path path-element="${FLEX_HOME}/frameworks"/>
+      <compiler.debug>true</compiler.debug>
+    </mxmlc>
+  </target>
+
   <!-- Build and output potlatch2.swf in release mode -->
   <target name="release" depends="init"> <!-- FIXME convention is dist not release -->
     <mxmlc file="potlatch2.mxml">
     </mxmlc>
   </target>
 
+  <target name="release-no-locales" depends="init-no-locales"> <!-- FIXME convention is dist not release -->
+    <mxmlc file="potlatch2.mxml">
+      <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
+      <source-path path-element="${FLEX_HOME}/frameworks"/>
+      <compiler.debug>false</compiler.debug>
+    </mxmlc>
+  </target>
+
   <target name="halcyon">
     <mxmlc file="halcyon_viewer.as" />
   </target>
 
   <target name="clean"
     description="clean up" >
-    <!-- Delete the ${build} and ${dist} directory trees -->
-    <!--
-
-    FIXME what is supposed to be cleaned?
-
-    <delete dir="${build}"/>
-    <delete dir="${dist}"/>
-
-    -->
+    <delete dir="${basedir}/resources/generated"/>
+    <delete dir="${basedir}/resources/locales"/>
+    <delete>
+      <fileset dir="${basedir}/resources" includes="potlatch2.swf*"/>
+    </delete>
   </target>