LUCENE-904: The "package" targets in build.xml now also generate .md5 checksum files

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@544341 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Busch 2007-06-05 01:18:48 +00:00
parent bcc79d1e84
commit 0fe4946a60
2 changed files with 38 additions and 2 deletions

View File

@ -256,6 +256,9 @@ Build
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

View File

@ -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>