1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-14 00:02:05 +01:00
Smack/build/release.xml
2014-02-03 01:55:16 +00:00

124 lines
4.5 KiB
XML

<?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-1.0b2.jar"/>
</classpath>
</taskdef>
<!-- PROPERTIES -->
<!-- ======================================================================================= -->
<!-- TARGETS -->
<!-- ======================================================================================= -->
<!-- all -->
<!-- ======================================================================================= -->
<target name="all">
<!-- create release properties -->
<property name="release.dir" value="${basedir}/target/release/${version}" />
<property name="release.samples.dir" value="${release.dir}/samples" />
<tstamp>
<format property="release.date" pattern="dd/MM/yyyy" locale="en"/>
</tstamp>
<!-- 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-${version}.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-${version}.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-debug-${version}.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-jingle-${version}.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-workgroup-${version}.jar" />
<fileset dir="${jar.dest.dir}" includes="smackx-experimental-${experimental.version}.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="releasedate" value="${release.date}"/>
<filter token="version" value="${version}"/>
</filterset>
</copy>
<!-- Package -->
<zip destfile="${basedir}/target/release/smack-${version}.zip"
basedir="${release.dir}"
includes="**/*.*"
/>
<tar destfile="${basedir}/target/release/smack-${version}.tar.gz"
basedir="${release.dir}"
includes="**/*.*"
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>