Skip to content

Commit

Permalink
add config to deployment with phing
Browse files Browse the repository at this point in the history
  • Loading branch information
stfalcon committed Dec 2, 2010
1 parent fc2ad50 commit 4e40694
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions build.xml
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="calculator" basedir="." default="build">
<property name="builddir" value="./build" />
<property name="sourcedir" value="application" />
<property name="logsdir" value="${builddir}/logs" />

<target name="init">
<mkdir dir="${builddir}" />
<mkdir dir="${logsdir}" />
<!--<mkdir dir="${logsdir}/coverage" />-->
</target>

<target name="clean">
<echo msg="Clean..." />
<delete dir="${builddir}" />
</target>

<target name="build" depends="clean,init,phpcpd,phpunit" />

<!-- PHP copy/paste analysis -->
<target name="phpcpd">
<phpcpd>
<fileset dir="${sourcedir}" id="filestocpd">
<include name="**/*.php"/>
</fileset>
<formatter type="pmd" outfile="${logsdir}/pmd.xml"/>
</phpcpd>
</target>

<!-- PHPUnit tests -->
<target name="phpunit">
<coverage-setup database="${logsdir}/coverage.db">
<fileset dir="${sourcedir}">
<include name="**/*.php"/>
</fileset>
</coverage-setup>

<phpunit codecoverage="true">
<formatter todir="${logsdir}" type="xml" outfile="phpunit.xml" />
<batchtest>
<fileset dir="tests">
<include name="**/*Test*.php"/>
<exclude name="**/Abstract*.php"/>
</fileset>
</batchtest>
</phpunit>
</target>
</project>

0 comments on commit 4e40694

Please sign in to comment.