author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 10 Jan 2009 22:34:11 +0100 | |
changeset 305 | e6b3dc7d5795 |
parent 274 | e1a7420cea38 |
child 322 | c12a563d36a4 |
permissions | -rw-r--r-- |
jtulach@119 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
jtulach@131 | 2 |
<project name="samples" default="test" basedir="."> |
jtulach@131 | 3 |
<property name="samples.dir" location="${ant.file.samples}/.."/> |
jtulach@131 | 4 |
<dirset id="examples" dir="${samples.dir}"> |
jtulach@119 | 5 |
<include name="**/nbproject"/> |
jtulach@262 | 6 |
<exclude name="nbproject"/> |
jtulach@119 | 7 |
<exclude name="apifest1/day3-intermezzo/**"/> |
jtulach@120 | 8 |
<exclude name="apifest1/infrastructure/testing-template/**"/> |
jtulach@119 | 9 |
</dirset> |
jtulach@119 | 10 |
|
jtulach@119 | 11 |
|
jtulach@119 | 12 |
<target name="clean"> |
jtulach@131 | 13 |
<delete dir="${samples.dir}/build"/> |
jtulach@119 | 14 |
<subant target="clean" antfile="../build.xml"> |
jtulach@119 | 15 |
<dirset refid="examples"/> |
jtulach@119 | 16 |
</subant> |
jtulach@119 | 17 |
</target> |
jtulach@119 | 18 |
|
jtulach@119 | 19 |
<target name="build"> |
jtulach@131 | 20 |
<ant dir="${samples.dir}/libs"/> |
jtulach@119 | 21 |
<subant target="compile" antfile="../build.xml"> |
jtulach@119 | 22 |
<dirset refid="examples"/> |
jtulach@119 | 23 |
</subant> |
jtulach@119 | 24 |
</target> |
jtulach@126 | 25 |
|
jtulach@126 | 26 |
<target name="test" depends="build"> |
jtulach@263 | 27 |
<subant target="test" antfile="../build.xml" failonerror="true"> |
jtulach@126 | 28 |
<dirset refid="examples"/> |
jtulach@263 | 29 |
<property name="test-sys-prop.no.failures" value="true"/> |
jtulach@126 | 30 |
</subant> |
jtulach@126 | 31 |
</target> |
jtulach@119 | 32 |
|
jtulach@126 | 33 |
<target name="-version" unless="version"> |
jtulach@131 | 34 |
<exec dir="${samples.dir}" outputproperty="version" executable="/bin/sh"> |
jtulach@131 | 35 |
<arg file="${samples.dir}/version.sh"/> |
jtulach@126 | 36 |
</exec> |
jtulach@126 | 37 |
</target> |
jtulach@299 | 38 |
<target name="-revision" unless="revision"> |
jtulach@299 | 39 |
<exec dir="${samples.dir}" outputproperty="revision" executable="/bin/sh"> |
jtulach@299 | 40 |
<arg file="${samples.dir}/tip.sh"/> |
jtulach@299 | 41 |
</exec> |
jtulach@299 | 42 |
</target> |
jtulach@126 | 43 |
|
jtulach@258 | 44 |
<target name="sources" depends="-version,clean"> |
jtulach@126 | 45 |
<fail unless="version"/> |
jtulach@126 | 46 |
|
jtulach@260 | 47 |
<loadfile srcfile="${samples.dir}/../.hgignore" property="hgignore"/> |
jtulach@131 | 48 |
<mkdir dir="${samples.dir}/build"/> |
jtulach@189 | 49 |
<zip basedir="${samples.dir}" destfile="${samples.dir}/build/apidesign-${version}.zip"> |
jtulach@126 | 50 |
<not> |
jtulach@126 | 51 |
<containsregexp expression="${hgignore}"/> |
jtulach@126 | 52 |
</not> |
jtulach@126 | 53 |
<not> |
jtulach@126 | 54 |
<filename name="version.sh"/> |
jtulach@126 | 55 |
</not> |
jtulach@126 | 56 |
</zip> |
jtulach@126 | 57 |
</target> |
jtulach@270 | 58 |
|
jtulach@299 | 59 |
<target name="snippets" depends="-revision"> |
jtulach@299 | 60 |
<fail unless="revision"/> |
jtulach@299 | 61 |
|
jtulach@270 | 62 |
<property name="snippets.dir" location="build/snippets"/> |
jtulach@270 | 63 |
<ant dir="../java/ant"/> |
jtulach@270 | 64 |
<taskdef name="grepcopy" classname="org.apidesign.infra.ant.GrepCopy" classpath="../java/ant/dist/apidesign-ant-tasks.jar"/> |
jtulach@299 | 65 |
<grepcopy target="${snippets.dir}" baseurl="http://source.apidesign.org/hg/apidesign/file/${revision}/samples/"> |
jtulach@270 | 66 |
<fileset dir="."> |
jtulach@270 | 67 |
<include name="**/*"/> |
jtulach@270 | 68 |
<exclude name="**/build/**/*"/> |
jtulach@270 | 69 |
</fileset> |
jtulach@270 | 70 |
</grepcopy> |
jtulach@270 | 71 |
</target> |
jtulach@119 | 72 |
</project> |