-
Notifications
You must be signed in to change notification settings - Fork 20
/
build.xml
68 lines (58 loc) · 2.02 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<project name="Lemur" default="package" basedir=".">
<!-- Define default for ${args} in the lein exec below. -->
<property name="args" value="" />
<macrodef name="lein">
<element name="lein-params" implicit="true"/>
<sequential>
<exec executable="lein2" failonerror="yes"
dir="${basedir}">
<arg line="${args}"/>
<env key="JVM_OPTS" value="-Droot.logger=error,file,stdout"/>
<lein-params/>
</exec>
</sequential>
</macrodef>
<target name="libdir">
<lein><arg value="libdir"/></lein>
</target>
<target name="jar">
<lein><arg value="jar"/></lein>
</target>
<target name="package" depends="libdir,jar">
<exec logError="true" executable="bash" outputproperty="jar-name">
<arg value="-c"/>
<arg value="ls target/lemur-*.jar"/>
</exec>
<fail message="Could not find lemur jar">
<condition><length string="${jar-name}" trim="true" length="0"/></condition>
</fail>
<echo message="jar ${jar-name}"/>
<exec logError="true" executable="sed" failonerror="true" inputstring="${jar-name}" outputproperty="jar-version">
<arg value="-e"/>
<arg value="s/.*lemur-\(.*\).jar/\1/"/>
</exec>
<echo message="jar ${jar-version}"/>
<tar destfile="${basedir}/releases/lemur-${jar-version}.tgz"
compression="gzip">
<tarfileset dir="${basedir}"
prefix="/lemur-${jar-version}">
<include name="README.md"/>
<include name="CHANGES.txt"/>
<include name="LICENSE"/>
<include name="project.clj"/>
<include name="lib/*.jar"/>
<include name="src/"/>
<include name="examples/"/>
</tarfileset>
<tarfileset dir="${basedir}/target"
prefix="/lemur-${jar-version}">
<include name="lemur-*.jar"/>
</tarfileset>
<tarfileset dir="${basedir}"
filemode="755"
prefix="/lemur-${jar-version}">
<include name="bin/"/>
</tarfileset>
</tar>
</target>
</project>