1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-23 11:07:57 +01:00
Smack/build/release.xml

133 lines
4.7 KiB
XML
Raw Normal View History

<?xml version="1.0"?>
<!-- Smack Build Script ========================================== -->
<!-- Jive Software ============================================== -->
<!--
$RCSfile$
$Revision$
$Date$
-->
<project name="Smack Release Script" default="all" basedir="..">
<!-- Include Ant Optional Tasks -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="${basedir}/build/ant-contrib.jar"/>
</classpath>
</taskdef>
<!-- PROPERTIES -->
<!-- ======================================================================================= -->
<!-- TARGETS -->
<!-- ======================================================================================= -->
<!-- all -->
<!-- ======================================================================================= -->
<target name="all">
<!-- create release properties -->
<if>
<equals arg1="${dailybuild}" arg2="true" />
<then>
<tstamp>
<format property="build.date" pattern="yyyyMMdd" locale="en"/>
</tstamp>
<property name="release.name" value="smack-${version.filename}-${build.date}" />
</then>
<else>
<property name="release.name" value="smack-${version.filename}" />
</else>
</if>
<property name="release.dir" value="${basedir}/target/release/${release.name}" />
<property name="release.samples.dir" value="${release.dir}/samples" />
<!-- create release dirs -->
<mkdir dir="${release.dir}" />
<mkdir dir="${release.samples.dir}" />
<!-- Copy smack.jar -->
<copy todir="${release.dir}">
<fileset dir="${jar.dest.dir}" includes="smack.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-debug.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-jingle.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-workgroup.jar" />
</copy>
<copy todir="${release.samples.dir}">
<fileset dir="${basedir}/build/resources/META-INF" includes="sample.providers" />
<fileset dir="${basedir}/build/resources/META-INF" includes="smack-config.xml" />
</copy>
<!-- Copy Javadocs -->
<copy todir="${release.dir}/javadoc">
<fileset dir="${basedir}/target/javadoc" includes="**/*.*" />
</copy>
<!-- Copy documentation -->
<copy todir="${release.dir}/documentation">
<fileset dir="${basedir}/documentation" includes="**/*.*" />
</copy>
<!-- Copy readme.html and changelog.html -->
<copy todir="${release.dir}">
<fileset dir="${basedir}/build/resources/releasedocs" includes="*.html" />
<filterset>
<filter token="builddate" value="${builddate}"/>
<filter token="version" value="${version}"/>
</filterset>
</copy>
<!-- Package -->
<zip destfile="${basedir}/target/release/${release.name}.zip"
basedir="${release.dir}/.."
includes="${release.name}/**/*.*"
/>
<tar destfile="${basedir}/target/release/${release.name}.tar.gz"
basedir="${release.dir}/.."
includes="${release.name}/**/*.*"
compression="gzip"
/>
<echo>
-----------------------------------------------
Release made
-----------------------------------------------
</echo>
</target>
<!-- test -->
<!-- ======================================================================================= -->
<target name="test">
<property name="testdir" value="${release-dev.dir}/.test" />
<!-- copy the build to a temp dir so we can run sanity tests -->
<mkdir dir="${testdir}" />
<copy todir="${testdir}">
<fileset dir="${release-dev.dir}">
<exclude name=".test/**/*.*" />
</fileset>
</copy>
<!-- run sanity tests -->
<ant dir="${testdir}" antfile="build/build.xml" target="jar" inheritAll="false">
<property name="no.test" value="true" />
</ant>
<ant dir="${testdir}" antfile="build/build.xml" target="javadoc" inheritAll="false">
<property name="no.test" value="true" />
</ant>
<ant dir="${testdir}" antfile="build/build.xml" target="clean" inheritAll="false">
<property name="no.test" value="true" />
</ant>
<echo>
----------------------------
...release tests pass, done.
----------------------------
</echo>
</target>
</project>