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>
|
2014-01-19 18:24:41 +01:00
|
|
|
<format property="build.date" pattern="yyyyMMdd" locale="en"/>
|
2003-04-05 03:13:07 +02:00
|
|
|
</tstamp>
|
2014-01-19 18:24:41 +01:00
|
|
|
<property name="release.name" value="smack-${version.filename}-${build.date}" />
|
2003-04-05 03:13:07 +02:00
|
|
|
</then>
|
|
|
|
<else>
|
2014-01-19 18:24:41 +01:00
|
|
|
<property name="release.name" value="smack-${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}" />
|
2014-01-16 06:14:39 +01:00
|
|
|
<property name="release.samples.dir" value="${release.dir}/samples" />
|
2014-01-19 18:24:41 +01:00
|
|
|
|
|
|
|
<!-- create release dirs -->
|
2003-01-20 16:57:23 +01:00
|
|
|
<mkdir dir="${release.dir}" />
|
2014-01-16 06:14:39 +01:00
|
|
|
<mkdir dir="${release.samples.dir}" />
|
2014-01-19 18:24:41 +01:00
|
|
|
|
|
|
|
<!-- Copy smack.jar -->
|
2003-01-24 03:44:25 +01:00
|
|
|
<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" />
|
2014-01-20 03:25:35 +01:00
|
|
|
<fileset dir="${jar.dest.dir}" includes="smackx-workgroup.jar" />
|
2003-01-24 03:44:25 +01:00
|
|
|
</copy>
|
2014-01-16 06:14:39 +01:00
|
|
|
<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>
|
2014-01-19 18:24:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
<!-- Copy Javadocs -->
|
2003-01-20 16:57:23 +01:00
|
|
|
<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>
|
2014-01-19 18:24:41 +01:00
|
|
|
|
|
|
|
<!-- Copy documentation -->
|
2003-01-20 16:57:23 +01:00
|
|
|
<copy todir="${release.dir}/documentation">
|
|
|
|
<fileset dir="${basedir}/documentation" includes="**/*.*" />
|
|
|
|
</copy>
|
2014-01-19 18:24:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
<!-- Copy readme.html and changelog.html -->
|
2003-01-20 16:57:23 +01:00
|
|
|
<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-08-05 04:37:03 +02:00
|
|
|
|
2014-01-19 18:24:41 +01:00
|
|
|
<!-- 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"
|
|
|
|
/>
|
2003-08-05 04:37:03 +02:00
|
|
|
<echo>
|
|
|
|
-----------------------------------------------
|
2014-01-19 18:24:41 +01:00
|
|
|
Release made
|
2003-08-05 04:37:03 +02:00
|
|
|
-----------------------------------------------
|
|
|
|
</echo>
|
|
|
|
</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>
|