lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r544341 - in /lucene/java/trunk: CHANGES.txt build.xml
Date Tue, 05 Jun 2007 01:18:49 GMT
Author: buschmi
Date: Mon Jun  4 18:18:48 2007
New Revision: 544341

URL: http://svn.apache.org/viewvc?view=rev&rev=544341
Log:
LUCENE-904: The "package" targets in build.xml now also generate .md5 checksum files

Modified:
    lucene/java/trunk/CHANGES.txt
    lucene/java/trunk/build.xml

Modified: lucene/java/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/java/trunk/CHANGES.txt?view=diff&rev=544341&r1=544340&r2=544341
==============================================================================
--- lucene/java/trunk/CHANGES.txt (original)
+++ lucene/java/trunk/CHANGES.txt Mon Jun  4 18:18:48 2007
@@ -256,6 +256,9 @@
  4. LUCENE-894: Add custom build file for binary distributions that includes
     targets to build the demos. (Chris Hostetter, Michael Busch)
 
+ 5. LUCENE-904: The "package" targets in build.xml now also generate .md5
+    checksum files. (Chris Hostetter, Michael Busch)
+
 ======================= Release 2.1.0 2007-02-14 =======================
 
 Changes in runtime behavior

Modified: lucene/java/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/java/trunk/build.xml?view=diff&rev=544341&r1=544340&r2=544341
==============================================================================
--- lucene/java/trunk/build.xml (original)
+++ lucene/java/trunk/build.xml Mon Jun  4 18:18:48 2007
@@ -12,6 +12,9 @@
   <property name="demo.war.name" value="luceneweb"/>
   <property name="javadoc.link" value="http://java.sun.com/j2se/1.4/docs/api/"/>
 
+  <!-- Type of checksum to compute for distribution files -->
+  <property name="checksum.algorithm" value="md5" />
+	
   <!-- Build classpath -->
   <path id="classpath">
     <pathelement location="${build.dir}/classes/java"/>
@@ -190,6 +193,7 @@
         <patternset refid="binary.build.dist.patterns"/>
       </zipfileset>
     </zip>
+	<lucene-checksum file="${dist.dir}/lucene-${version}.zip"/>
   </target>
 
   <!-- ================================================================== -->
@@ -215,6 +219,7 @@
     <gzip zipfile="${dist.dir}/lucene-${version}.tar.gz"
       src="${build.dir}/lucene-${version}.tar"
       />
+	<lucene-checksum file="${dist.dir}/lucene-${version}.tar.gz"/>
   </target>
 
   <!-- ================================================================== -->
@@ -253,6 +258,7 @@
         <patternset refid="src.dist.patterns"/>
       </zipfileset>
     </zip>
+	<lucene-checksum file="${dist.dir}/lucene-${version}-src.zip"/>
   </target>
 
   <!-- ================================================================== -->
@@ -274,6 +280,7 @@
     <gzip zipfile="${dist.dir}/lucene-${version}-src.tar.gz"
           src="${build.dir}/lucene-${version}-src.tar"
     />
+	<lucene-checksum file="${dist.dir}/lucene-${version}-src.tar.gz"/>
   </target>
 
   <!-- ================================================================== -->
@@ -492,6 +499,32 @@
 
    </sequential>
   </macrodef>
-
-
+	
+  <!-- Macro for building checksum files
+       This is only needed until the "format" option is supported
+       by ant's built in checksum task
+   -->
+  <macrodef name="lucene-checksum">
+    <attribute name="file"/>
+    <!-- NOTE: we use the value of @{file} in the names any properties
+         set because macro's don't have variables, and otherwise we
+         wouldn't be able to checksum more then one file per build
+      -->
+    <sequential>
+      <checksum file="@{file}"
+                property="@{file}.sum"
+                algorithm="${checksum.algorithm}" />
+      <basename file="@{file}" property="@{file}.base" />
+      <concat destfile="@{file}.${checksum.algorithm}"
+              force="yes"
+              append="false"
+              fixlastline="yes">
+        <header trimleading="yes">${@{file}.sum}  </header>
+        <!-- empty fileset to trick concat -->
+        <fileset dir="." excludes="**" />
+        <footer trimleading="yes">${@{file}.base}
+        </footer>
+      </concat>
+    </sequential>
+  </macrodef>
 </project>



Mime
View raw message