Permalink
Browse files

Added build.xml

  • Loading branch information...
0 parents commit 413c9082b85e3da0b45ee01e2cbd2220380a41ad @davideme committed Feb 11, 2012
Showing with 40 additions and 0 deletions.
  1. +40 −0 build.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="PHPUnit" default="build">
+ <property name="php" value="php"/>
+
+ <target name="build"
+ depends="prepare,lint,phpunit"/>
+
+ <target name="clean" description="Cleanup build artifacts">
+ <delete dir="${basedir}/build/api"/>
+ <delete dir="${basedir}/build/coverage"/>
+ </target>
+
+ <target name="prepare" depends="clean"
+ description="Prepare for build">
+ <mkdir dir="${basedir}/build/api"/>
+ <mkdir dir="${basedir}/build/coverage"/>
+ </target>
+
+ <target name="lint">
+ <apply executable="${php}" failonerror="true">
+ <arg value="-l" />
+
+ <fileset dir="${basedir}">
+ <include name="**/*.php" />
+ <modified />
+ </fileset>
+
+ <fileset dir="${basedir}/Tests">
+ <include name="**/*.php" />
+ <modified />
+ </fileset>
+ </apply>
+ </target>
+
+ <target name="phpunit" description="Run unit tests with PHPUnit">
+ <exec executable="${php}" failonerror="true">
+ <arg path="${basedir}/phpunit.php" />
+ </exec>
+ </target>
+</project>

0 comments on commit 413c908

Please sign in to comment.