We know how to build the source zip file
authorJaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:55:02 +0200
changeset 1223611475f83db
parent 121 1725f11cf455
child 123 920e95b47036
We know how to build the source zip file
samples/build.xml
samples/version.sh
     1.1 --- a/samples/build.xml	Sat Jun 14 09:55:02 2008 +0200
     1.2 +++ b/samples/build.xml	Sat Jun 14 09:55:02 2008 +0200
     1.3 @@ -8,6 +8,8 @@
     1.4      
     1.5      
     1.6      <target name="clean">
     1.7 +        <delete dir="build"/>
     1.8 +        <delete dir="libs/dist"/>
     1.9          <subant target="clean" antfile="../build.xml">
    1.10              <dirset refid="examples"/>
    1.11          </subant>
    1.12 @@ -26,4 +28,24 @@
    1.13          </subant>
    1.14      </target>
    1.15      
    1.16 +    <target name="-version" unless="version">
    1.17 +        <exec dir="${ant.file.apidesign.org}/.." outputproperty="version" executable="/bin/sh">
    1.18 +            <arg file="version.sh"/>
    1.19 +        </exec>
    1.20 +    </target>
    1.21 +
    1.22 +    <target name="sources" depends="-version,clean">
    1.23 +        <fail unless="version"/>
    1.24 +        
    1.25 +        <loadfile srcfile="${ant.file.apidesign.org}/../../../.hgignore" property="hgignore"/>
    1.26 +        <mkdir dir="build"/>
    1.27 +        <zip basedir="${ant.file.apidesign.org}/.." destfile="build/apidesign-${version}.zip">
    1.28 +            <not>
    1.29 +                <containsregexp expression="${hgignore}"/>
    1.30 +            </not>
    1.31 +            <not>
    1.32 +                <filename name="version.sh"/>
    1.33 +            </not>
    1.34 +        </zip>
    1.35 +    </target>
    1.36  </project>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/samples/version.sh	Sat Jun 14 09:55:02 2008 +0200
     2.3 @@ -0,0 +1,2 @@
     2.4 +#!/bin/sh
     2.5 +hg log --template '0' . | wc -c