Skip to content

Commit

Permalink
Add a release task to generate releasable files.
Browse files Browse the repository at this point in the history
  • Loading branch information
run2000 committed Jun 2, 2014
1 parent ba24f6b commit 7eca7eb
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@


<target name="dist" depends="compile, javadoc"
description="generate the distribution files" >
description="generate the distribution files">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>

Expand All @@ -44,11 +44,49 @@
<zip destfile="${dist}/lib/compactbeans-javadoc-${version}.zip" basedir="${doc}"/>
</target>

<target name="release" depends="clean, dist"
description="build the release files">

<patternset id="redistributables">
<include name="src/**" />
<include name="dist/**" />
<include name="docs/**" />
<include name="*.xml" />
<include name="*.md" />
<include name="LICENSE" />
<include name="ASSEMBLY_EXCEPTION" />
</patternset>

<zip destfile="../compactbeans-${version}.zip">
<fileset dir=".">
<patternset refid="redistributables" />
</fileset>
</zip>

<tar destfile="../compactbeans-${version}.tar">
<fileset dir=".">
<patternset refid="redistributables" />
</fileset>
</tar>

<gzip src="../compactbeans-${version}.tar"
destfile="../compactbeans-${version}.tar.gz" />

<bzip2 src="../compactbeans-${version}.tar"
destfile="../compactbeans-${version}.tar.bz2" />

<delete file="../compactbeans-${version}.tar" />
</target>

<target name="clean"
description="clean up" >
<!-- Delete the ${build}, ${doc}, and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${doc}"/>
<delete dir="${dist}"/>
<delete file="../compactbeans-${version}.zip" />
<delete file="../compactbeans-${version}.tar" />
<delete file="../compactbeans-${version}.tar.gz" />
<delete file="../compactbeans-${version}.tar.bz2" />
</target>
</project>

0 comments on commit 7eca7eb

Please sign in to comment.