common/build.xml
changeset 1273 92bfe0d10c29
parent 1249 96548ab09767
child 1274 b5003eee1583
--- a/common/build.xml	Thu Sep 30 12:35:20 2010 +0100
+++ b/common/build.xml	Thu Sep 30 17:39:10 2010 +0100
@@ -778,13 +778,24 @@
             <property name="zip.${zip.target.name}.log.file" location="${build.log.dir}/${build.id}_${zip.target.name}_zip.log" />
             <property name="zips.${zip.target.name}.spec.name" value="${zip.target.name}" />
             <if><isset property="sf.using.newer.than.helium5"/>
-            <then>
+              <then>
                 <hlm:zipContentMacro type="${zip.target.name}" file="${zip.config.file}" failonemptyconfig="false"/>
-            </then>
-            <else>
+              </then>
+              <else>
                 <hlm:zipContentMacro type="${zip.target.name}" file="${zip.config.file}" />
-            </else>
+              </else>
             </if>
+
+            <!-- Now patch up zip filenames and to avoid double extensions -->
+            <move verbose="true" todir="${build.drive}/output/zips/">
+              <fileset dir="${build.drive}/output/zips/" includes="**/*.zip"/>
+              <mapper type="regexp" from="^(.+?\.(7z|zip))\.zip$" to="\1"/>
+            </move>
+
+            <!-- And patch up the release metadata to match -->
+            <replaceregexp match="\.(7z|zip)\.zip" replace=".\1">
+              <fileset dir="${build.drive}/output/zips/" includes="**/release_metadata.xml"/>
+            </replaceregexp>
           </then>
           <else>
             <echo message="ERROR ${zip.config.file} not available for zipping!"/>
@@ -823,7 +834,7 @@
     <!-- Unpack the rnd zips ready to be used in the build -->
     <target name="sf-unpack-rnd">
         <echo message="INFO Unpacking any available RnD binaries"/>
-		<mkdir dir="${build.drive}/output/zips/"/>
+        <mkdir dir="${build.drive}/output/zips/"/>
         <for param="rndZip">
             <fileset dir="${build.drive}/output/zips/">
                 <include name="binaries_*.zip"/> <!-- Internal rnd bins -->