author | Jaroslav Tulach <jtulach@netbeans.org> |
Sat, 14 Jun 2008 09:55:24 +0200 | |
changeset 131 | 7e5f84aa1196 |
parent 130 | 30285b0ed28e |
child 141 | 9ae8488379e0 |
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@119 | 6 |
<exclude name="apifest1/day3-intermezzo/**"/> |
jtulach@120 | 7 |
<exclude name="apifest1/infrastructure/testing-template/**"/> |
jtulach@119 | 8 |
</dirset> |
jtulach@119 | 9 |
|
jtulach@119 | 10 |
|
jtulach@119 | 11 |
<target name="clean"> |
jtulach@131 | 12 |
<delete dir="${samples.dir}/build"/> |
jtulach@131 | 13 |
<delete dir="${samples.dir}/libs/dist"/> |
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@126 | 27 |
<subant target="test" antfile="../build.xml" failonerror="false"> |
jtulach@126 | 28 |
<dirset refid="examples"/> |
jtulach@126 | 29 |
</subant> |
jtulach@126 | 30 |
</target> |
jtulach@119 | 31 |
|
jtulach@126 | 32 |
<target name="-version" unless="version"> |
jtulach@131 | 33 |
<exec dir="${samples.dir}" outputproperty="version" executable="/bin/sh"> |
jtulach@131 | 34 |
<arg file="${samples.dir}/version.sh"/> |
jtulach@126 | 35 |
</exec> |
jtulach@126 | 36 |
</target> |
jtulach@126 | 37 |
|
jtulach@126 | 38 |
<target name="sources" depends="-version,clean"> |
jtulach@126 | 39 |
<fail unless="version"/> |
jtulach@126 | 40 |
|
jtulach@131 | 41 |
<loadfile srcfile="${samples.dir}/../../.hgignore" property="hgignore"/> |
jtulach@131 | 42 |
<mkdir dir="${samples.dir}/build"/> |
jtulach@131 | 43 |
<zip basedir="${samples.dir}/.." destfile="${samples.dir}/build/apidesign-${version}.zip"> |
jtulach@126 | 44 |
<not> |
jtulach@126 | 45 |
<containsregexp expression="${hgignore}"/> |
jtulach@126 | 46 |
</not> |
jtulach@126 | 47 |
<not> |
jtulach@126 | 48 |
<filename name="version.sh"/> |
jtulach@126 | 49 |
</not> |
jtulach@126 | 50 |
</zip> |
jtulach@126 | 51 |
</target> |
jtulach@119 | 52 |
</project> |