2003-01-20 16:57:23 +01:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<!-- Smack Build Script ========================================== -->
|
|
|
|
<!-- Jive Software ============================================== -->
|
|
|
|
|
|
|
|
<!--
|
|
|
|
$RCSfile$
|
|
|
|
$Revision$
|
|
|
|
$Date$
|
|
|
|
-->
|
|
|
|
|
|
|
|
<project name="Smack Release Script" default="all" basedir="..">
|
|
|
|
|
2003-04-05 03:13:07 +02:00
|
|
|
<!-- Include Ant Optional Tasks -->
|
|
|
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="${basedir}/build/ant-contrib.jar"/>
|
|
|
|
</classpath>
|
2003-08-05 04:37:03 +02:00
|
|
|
</taskdef>
|
2003-04-05 03:13:07 +02:00
|
|
|
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- PROPERTIES -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
|
|
|
|
<!-- TARGETS -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
|
|
|
|
<!-- all -->
|
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="all">
|
2003-08-05 04:37:03 +02:00
|
|
|
<!-- create release properties -->
|
2003-04-05 03:13:07 +02:00
|
|
|
<if>
|
|
|
|
<equals arg1="${dailybuild}" arg2="true" />
|
|
|
|
<then>
|
|
|
|
<tstamp>
|
2004-11-01 21:10:58 +01:00
|
|
|
<format property="build.date" pattern="yyyy-MM-dd" locale="en"/>
|
2003-04-05 03:13:07 +02:00
|
|
|
</tstamp>
|
|
|
|
<property name="release.name" value="smack-${build.date}" />
|
2007-02-06 20:30:53 +01:00
|
|
|
<property name="release-dev.name" value="smack_src_${build.date}" />
|
2003-04-05 03:13:07 +02:00
|
|
|
</then>
|
|
|
|
<else>
|
2007-02-06 19:34:17 +01:00
|
|
|
<property name="release.name" value="smack_${version.filename}" />
|
2007-02-06 20:30:53 +01:00
|
|
|
<property name="release-dev.name" value="smack_src_${version.filename}" />
|
2003-04-05 03:13:07 +02:00
|
|
|
</else>
|
2003-08-05 04:37:03 +02:00
|
|
|
</if>
|
2007-01-08 00:03:16 +01:00
|
|
|
<property name="release.dir" value="${basedir}/target/release/${release.name}" />
|
|
|
|
<property name="release-dev.dir" value="${basedir}/target/release/${release-dev.name}" />
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- create release dirs -->
|
|
|
|
<mkdir dir="${release.dir}" />
|
2003-09-28 21:34:31 +02:00
|
|
|
<mkdir dir="${release-dev.dir}" />
|
2003-01-24 03:44:25 +01:00
|
|
|
<!-- Copy smack.jar -->
|
|
|
|
<copy todir="${release.dir}">
|
2003-01-24 04:30:37 +01:00
|
|
|
<fileset dir="${jar.dest.dir}" includes="smack.jar" />
|
2003-08-02 00:14:28 +02:00
|
|
|
<fileset dir="${jar.dest.dir}" includes="smackx.jar" />
|
2004-03-06 03:24:27 +01:00
|
|
|
<fileset dir="${jar.dest.dir}" includes="smackx-debug.jar" />
|
2007-03-14 06:03:16 +01:00
|
|
|
<fileset dir="${jar.dest.dir}" includes="smackx-jingle.jar" />
|
|
|
|
<fileset dir="${jar.dest.dir}" includes="smackx-jingleMedia.jar" />
|
2003-01-24 03:44:25 +01:00
|
|
|
</copy>
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}">
|
|
|
|
<fileset dir="${jar.dest.dir}" includes="smack.jar" />
|
|
|
|
<fileset dir="${jar.dest.dir}" includes="smackx.jar" />
|
2004-03-06 03:24:27 +01:00
|
|
|
<fileset dir="${jar.dest.dir}" includes="smackx-debug.jar" />
|
2007-03-14 06:03:16 +01:00
|
|
|
<fileset dir="${jar.dest.dir}" includes="smackx-jingle.jar" />
|
|
|
|
<fileset dir="${jar.dest.dir}" includes="smackx-jingleMedia.jar" />
|
2003-09-28 21:34:31 +02:00
|
|
|
</copy>
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- Copy build dir -->
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/build">
|
2003-01-20 16:57:23 +01:00
|
|
|
<fileset dir="${basedir}/build">
|
|
|
|
<include name="ant*" />
|
2003-08-05 04:37:03 +02:00
|
|
|
<include name="junit.jar" />
|
2003-01-20 16:57:23 +01:00
|
|
|
<include name="build.xml" />
|
|
|
|
<include name="README.html" />
|
|
|
|
<include name="lib/*.jar" />
|
2003-01-24 04:30:37 +01:00
|
|
|
<include name="merge/*.jar" />
|
2003-01-20 16:57:23 +01:00
|
|
|
</fileset>
|
2007-02-20 21:18:21 +01:00
|
|
|
</copy>
|
|
|
|
<copy todir="${release-dev.dir}/jingle/extension/build">
|
|
|
|
<fileset dir="${basedir}/jingle/extension/build">
|
|
|
|
<include name="ant*" />
|
|
|
|
<include name="junit.jar" />
|
|
|
|
<include name="build.xml" />
|
|
|
|
<include name="README.html" />
|
|
|
|
<include name="lib/*.jar" />
|
|
|
|
<include name="merge/*.jar" />
|
|
|
|
</fileset>
|
2003-01-20 16:57:23 +01:00
|
|
|
</copy>
|
|
|
|
<!-- Copy Javadocs -->
|
|
|
|
<copy todir="${release.dir}/javadoc">
|
2007-01-08 00:03:16 +01:00
|
|
|
<fileset dir="${basedir}/target/javadoc" includes="**/*.*" />
|
2003-01-20 16:57:23 +01:00
|
|
|
</copy>
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/javadoc">
|
2007-01-08 00:03:16 +01:00
|
|
|
<fileset dir="${basedir}/target/javadoc" includes="**/*.*" />
|
2003-09-28 21:34:31 +02:00
|
|
|
</copy>
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- Copy documentation -->
|
|
|
|
<copy todir="${release.dir}/documentation">
|
|
|
|
<fileset dir="${basedir}/documentation" includes="**/*.*" />
|
|
|
|
</copy>
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/documentation">
|
|
|
|
<fileset dir="${basedir}/documentation" includes="**/*.*" />
|
|
|
|
</copy>
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- Copy source -->
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/source">
|
2003-01-20 16:57:23 +01:00
|
|
|
<fileset dir="${basedir}/source" includes="**/*.java" />
|
2003-08-05 04:37:03 +02:00
|
|
|
<fileset dir="${basedir}/source" includes="**/*.html" />
|
|
|
|
</copy>
|
2007-02-20 21:18:21 +01:00
|
|
|
<copy todir="${release-dev.dir}/jingle/extension/source">
|
|
|
|
<fileset dir="${basedir}/jingle/extension/source" includes="**/*.java" />
|
|
|
|
<fileset dir="${basedir}/jingle/extension/source" includes="**/*.html" />
|
|
|
|
</copy>
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/test">
|
2003-08-05 04:37:03 +02:00
|
|
|
<fileset dir="${basedir}/test" includes="**/*.java" />
|
|
|
|
</copy>
|
|
|
|
<!-- Copy resources -->
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}/build/resources">
|
2003-09-28 20:45:09 +02:00
|
|
|
<fileset dir="${basedir}/build/resources" includes="META-INF/smack.providers" />
|
2004-03-06 03:24:27 +01:00
|
|
|
<fileset dir="${basedir}/build/resources" includes="META-INF/smack-config.xml" />
|
|
|
|
</copy>
|
|
|
|
<copy todir="${release-dev.dir}/build/resources/images">
|
|
|
|
<fileset dir="${basedir}/build/resources/images">
|
|
|
|
<include name="*.png"/>
|
|
|
|
</fileset>
|
2003-01-20 16:57:23 +01:00
|
|
|
</copy>
|
|
|
|
<!-- Copy readme.html and changelog.html -->
|
|
|
|
<copy todir="${release.dir}">
|
2003-09-28 20:45:09 +02:00
|
|
|
<fileset dir="${basedir}/build/resources/releasedocs" includes="*.html" />
|
2007-02-04 22:24:51 +01:00
|
|
|
<filterset>
|
|
|
|
<filter token="builddate" value="${builddate}"/>
|
2007-02-05 19:38:37 +01:00
|
|
|
<filter token="version" value="${version}"/>
|
2007-02-04 22:24:51 +01:00
|
|
|
</filterset>
|
2003-01-20 16:57:23 +01:00
|
|
|
</copy>
|
2003-09-28 21:34:31 +02:00
|
|
|
<copy todir="${release-dev.dir}">
|
|
|
|
<fileset dir="${basedir}/build/resources/releasedocs" includes="*.html" />
|
2007-02-04 22:24:51 +01:00
|
|
|
<filterset>
|
|
|
|
<filter token="builddate" value="${builddate}"/>
|
2007-02-05 19:38:37 +01:00
|
|
|
<filter token="version" value="${version}"/>
|
2007-02-04 22:24:51 +01:00
|
|
|
</filterset>
|
2003-09-28 21:34:31 +02:00
|
|
|
</copy>
|
2003-01-20 16:57:23 +01:00
|
|
|
<!-- Package -->
|
2003-10-14 16:29:31 +02:00
|
|
|
<if>
|
|
|
|
<equals arg1="${dailybuild}" arg2="true" />
|
|
|
|
<then>
|
2007-02-04 07:17:15 +01:00
|
|
|
<zip destfile="${basedir}/target/release/${release-dev.name}.zip"
|
2003-10-14 16:29:31 +02:00
|
|
|
basedir="${release-dev.dir}/.."
|
|
|
|
includes="${release-dev.name}/**/*.*"
|
|
|
|
/>
|
2007-02-04 07:17:15 +01:00
|
|
|
<tar destfile="${basedir}/target/release/${release-dev.name}.tar.gz"
|
2003-10-14 16:29:31 +02:00
|
|
|
basedir="${release-dev.dir}/.."
|
|
|
|
includes="${release-dev.name}/**/*.*"
|
|
|
|
compression="gzip"
|
|
|
|
/>
|
|
|
|
</then>
|
|
|
|
<else>
|
2007-02-04 07:17:15 +01:00
|
|
|
<zip destfile="${basedir}/target/release/${release.name}.zip"
|
2003-10-14 16:29:31 +02:00
|
|
|
basedir="${release.dir}/.."
|
|
|
|
includes="${release.name}/**/*.*"
|
|
|
|
/>
|
2007-02-04 07:17:15 +01:00
|
|
|
<tar destfile="${basedir}/target/release/${release.name}.tar.gz"
|
2003-10-14 16:29:31 +02:00
|
|
|
basedir="${release.dir}/.."
|
|
|
|
includes="${release.name}/**/*.*"
|
|
|
|
compression="gzip"
|
|
|
|
/>
|
2007-02-04 07:17:15 +01:00
|
|
|
<zip destfile="${basedir}/target/release/${release-dev.name}.zip"
|
2003-10-14 16:29:31 +02:00
|
|
|
basedir="${release-dev.dir}/.."
|
|
|
|
includes="${release-dev.name}/**/*.*"
|
|
|
|
/>
|
2007-02-04 07:17:15 +01:00
|
|
|
<tar destfile="${basedir}/target/release/${release-dev.name}.tar.gz"
|
2003-10-14 16:29:31 +02:00
|
|
|
basedir="${release-dev.dir}/.."
|
|
|
|
includes="${release-dev.name}/**/*.*"
|
|
|
|
compression="gzip"
|
|
|
|
/>
|
|
|
|
</else>
|
|
|
|
</if>
|
2003-08-05 04:37:03 +02:00
|
|
|
|
|
|
|
<echo>
|
|
|
|
-----------------------------------------------
|
|
|
|
Release made, testing Ant targets of release...
|
|
|
|
-----------------------------------------------
|
|
|
|
</echo>
|
|
|
|
|
|
|
|
<!-- call the release tester -->
|
|
|
|
<antcall target="test" />
|
|
|
|
</target>
|
|
|
|
|
2003-09-18 05:48:49 +02:00
|
|
|
<!-- test -->
|
2003-08-05 04:37:03 +02:00
|
|
|
<!-- ======================================================================================= -->
|
|
|
|
<target name="test">
|
2003-09-28 21:34:31 +02:00
|
|
|
<property name="testdir" value="${release-dev.dir}/.test" />
|
2003-09-18 05:48:49 +02:00
|
|
|
|
|
|
|
<!-- copy the build to a temp dir so we can run sanity tests -->
|
|
|
|
<mkdir dir="${testdir}" />
|
|
|
|
<copy todir="${testdir}">
|
2003-09-28 21:34:31 +02:00
|
|
|
<fileset dir="${release-dev.dir}">
|
2003-09-18 05:48:49 +02:00
|
|
|
<exclude name=".test/**/*.*" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
|
|
|
|
<!-- run sanity tests -->
|
|
|
|
<ant dir="${testdir}" antfile="build/build.xml" target="jar" inheritAll="false">
|
2003-08-05 04:37:03 +02:00
|
|
|
<property name="no.test" value="true" />
|
|
|
|
</ant>
|
2003-09-18 05:48:49 +02:00
|
|
|
<ant dir="${testdir}" antfile="build/build.xml" target="javadoc" inheritAll="false">
|
2003-08-05 04:37:03 +02:00
|
|
|
<property name="no.test" value="true" />
|
|
|
|
</ant>
|
2003-09-18 05:48:49 +02:00
|
|
|
<ant dir="${testdir}" antfile="build/build.xml" target="clean" inheritAll="false">
|
2003-08-05 04:37:03 +02:00
|
|
|
<property name="no.test" value="true" />
|
|
|
|
</ant>
|
|
|
|
|
|
|
|
<echo>
|
|
|
|
----------------------------
|
|
|
|
...release tests pass, done.
|
|
|
|
----------------------------
|
|
|
|
</echo>
|
2003-01-20 16:57:23 +01:00
|
|
|
</target>
|
|
|
|
|
|
|
|
</project>
|