-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
82 lines (71 loc) · 2.66 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<project name="format" default="jar">
<description>
Build a jar that is the common lisp format library
</description>
<property name="build" location="classes"/>
<property name="clojure-jar" location="../clojure/clojure.jar"/>
<property name="unit-jar" location="../unit_test/unit-test.jar"/>
<!-- The JAR file to create. -->
<property name="jarfile" value="cl-format.jar"/>
<property name="releasedir" value="release/"/>
<target name="init">
<mkdir dir="${build}"/>
</target>
<target name="clean"
description="Remove generated files and directories.">
<delete file="${jarfile}"/>
<delete dir="${build}"/>
</target>
<target name="jar" depends="compile_classes"
description="Create jar file.">
<jar jarfile="${jarfile}">
<fileset dir="." includes="epl-v10.html"/>
<fileset dir="." includes="com/infolace/format.clj"/>
<fileset dir="." includes="com/infolace/format_base.clj"/>
<fileset dir="." includes="com/infolace/pprint.clj"/>
<fileset dir="." includes="com/infolace/dispatch.clj"/>
<fileset dir="." includes="com/infolace/format/utilities.clj"/>
<fileset dir="classes" includes="**/*.class"/>
</jar>
</target>
<target name="compile_classes" depends="init"
description="Compile clojure classes.">
<java classname="clojure.lang.Compile"
classpath=".:${build}:${clojure-jar}">
<sysproperty key="clojure.compile.path" value="${build}"/>
<arg value="com.infolace.format.ColumnWriter"/>
<arg value="com.infolace.format.PrettyWriter"/>
</java>
</target>
<target name="release" depends="jar"
description="Checks in the current jar file and tags the resulting checkin with a version number (use with -Dtagname=vX.Y.Z)">
<move file="${jarfile}" todir="${releasedir}"/>
<exec executable="git">
<arg value="add"/>
<arg value="-f"/>
<arg value="${releasedir}${jarfile}"/>
</exec>
<exec executable="git">
<arg value="commit"/>
<arg value="-m"/>
<arg value="Release ${tagname}"/>
</exec>
<exec executable="git">
<arg value="tag"/>
<arg value="-m"/>
<arg value="Making a release tag"/>
<arg value="${tagname}"/>
</exec>
</target>
<target name="run-tests" depends="jar"
description="Run all the unit tests">
<java classname="unit_test.run_tests" classpath="${clojure-jar}:${unit-jar}:${jarfile}:."
fork="true" failonerror="true">
<arg value="com.infolace.format.test.base"/>
</java>
<java classname="unit_test.run_tests" classpath="${clojure-jar}:${unit-jar}:${jarfile}:."
fork="true" failonerror="true">
<arg value="com.infolace.format.test.pretty"/>
</java>
</target>
</project>