Bug 478: build_*.zip missing from generated release_metadata.xml
authorSimon Howkins <simonh@symbian.org>
Wed, 14 Oct 2009 14:44:10 +0100
changeset 664 29955a149536
parent 663 27b2711afab1
child 665 ddca63d8e13c
child 666 d610907b5fe7
Bug 478: build_*.zip missing from generated release_metadata.xml Added call to zip system to add entries for these zips to the release_metadata.xml
common/build.postbuild.xml
common/templates/zip.cfg.xml.ftl.template
--- a/common/build.postbuild.xml	Wed Oct 14 14:54:28 2009 +0100
+++ b/common/build.postbuild.xml	Wed Oct 14 14:44:10 2009 +0100
@@ -86,7 +86,7 @@
         <ant antfile="${sf.common.config.dir}/generated/tag-hg-code.ant.xml"/>
     </target>
 
-    <target name="sf-run-evalid">
+    <target name="sf-run-evalid" depends="sf-preprocess-package-config">
         <delete dir="${build.drive}/output/md5"/>
         <mkdir  dir="${build.drive}/output/md5"/>
 
@@ -194,6 +194,11 @@
         <zip destfile="${build.output.dir}/zips/release/build_md5.zip">
             <zipfileset dir="${build.drive}/output/md5/" prefix="epoc32/relinfo"/>
         </zip>
+        <!-- Generate release_metadata entries for the above zips -->
+        <antcall target="sf-zip-content">
+            <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
+            <param name="zip.target.name" value="bin-just-metadata" />
+        </antcall>
     </target>    
     
     <target name="sf-package-binary" depends="sf-preprocess-package-config,sf-package-postbuild-rnd">
@@ -612,7 +617,7 @@
     </target>
 
     <!-- package all logs into zipfile for publishing -->
-    <target name="sf-zip-logs">
+    <target name="sf-zip-logs" depends="sf-preprocess-package-config">
         <if>
             <istrue value="${sf.spec.logs.zip.enable}"/>
             <then>
@@ -629,6 +634,10 @@
                     <zipfileset dir="${build.drive}/output/logs/BOM" prefix="build_info/logs/BOM"/>
                     <zipfileset dir="${build.drive}/output/logs/releaseables" prefix="build_info/logs/releaseables"/>
                 </zip>
+                <antcall target="sf-zip-content">
+                    <param name="zip.config.file" value="${sf.common.config.dir}/generated/zip.cfg.xml.ftl"/>
+                    <param name="zip.target.name" value="info-just-metadata" />
+                </antcall>
             </then>
         </if>
      </target>
--- a/common/templates/zip.cfg.xml.ftl.template	Wed Oct 14 14:54:28 2009 +0100
+++ b/common/templates/zip.cfg.xml.ftl.template	Wed Oct 14 14:44:10 2009 +0100
@@ -143,5 +143,27 @@
 				<set name="name" value="binaries_winscw"/>
 			</config>
 		</config>
+		<!-- "Null" info entries, which match no files, but do populate the release_metadata.xml -->
+		<config name="info-just-metadata" abstract="true">
+			<set name="archives.dir" value="${build.output.dir}/zips/release" />
+			<set name="include" value="*"/>
+			<set name="exclude" value="**"/>
+			<config name="logs">
+				<set name="name" value="build_logs"/>
+				<set name="grace.filters" value="logs"/>
+			</config>
+			<config name="BOM">
+				<set name="name" value="build_BOM"/>
+				<set name="grace.filters" value="info"/>
+			</config>
+		</config>
+		<!-- "Null" md5 entry, which matches no files, but does populate the release_metadata.xml -->
+		<config name="md5-just-metadata" abstract="true">
+			<set name="archives.dir" value="${build.output.dir}/zips/release" />
+			<set name="name" value="build_md5"/>
+			<set name="grace.filters" value="info"/>
+			<set name="include" value="*"/>
+			<set name="exclude" value="**"/>
+		</config>
 	</config>
 </build>