-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
51 lines (51 loc) · 2.03 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="test-CI" basedir="." xmlns:jsl="antlib:com.googlecode.jslint4java">
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="/usr/share/java/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<property file="build.properties"/>
<target name="clean">
<delete includeEmptyDirs="true">
<fileset dir="${basedir}/log" includes="**/*" excludes=".gitignore"/>
<fileset dir="${basedir}/tmp" includes="**/*" excludes=".gitignore"/>
</delete>
<antcall target="clean.build"/>
</target>
<target name="clean.build">
<if >
<available file="${basedir}/build" type="dir"/>
<then>
<delete includeEmptyDirs="true">
<fileset dir="${basedir}/build"/>
</delete>
</then>
</if>
</target>
<target name="ci.init">
<antcall target="clean.build"/>
<mkdir dir="${basedir}/build"/>
</target>
<target name="ci.instrument" depends="ci.init">
<exec executable="jscoverage" failonerror="true">
<arg value="${basedir}/lib"/>
<arg value="${basedir}/build"/>
</exec>
</target>
<target name="ci" depends="ci.instrument">
<exec executable="sh" dir="${basedir}" output="${basedir}/build/xunit.xml">
<arg value="-c"/>
<arg value="vows ${basedir}/tests/* --cover-html --xunit"/>
</exec>
<move file="${basedir}/coverage.html" todir="${basedir}/build"/>
<antcall target="ci.jslint"/>
</target>
<target name="ci.jslint">
<jsl:jslint haltOnFailure="false" options="node,es5,indent=2">
<formatter type="checkstyle" destfile="${basedir}/build/checkstyle.xml"/>
<fileset dir="${basedir}/lib" includes="**/*.js" />
<fileset erroronmissingdir="false" dir="${basedir}/node_modules" includes="**/*.js" />
</jsl:jslint>
</target>
</project>