Skip to content

Instantly share code, notes, and snippets.

@mlebkowski
Created September 10, 2012 10:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlebkowski/3690275 to your computer and use it in GitHub Desktop.
Save mlebkowski/3690275 to your computer and use it in GitHub Desktop.
Default Ant File
<?xml version="1.0" encoding="UTF-8"?>
<project name="Your Project Name" default="build">
<target name="build" depends="prepare,phpunit" />
<target name="clean" description="Cleanup build artifacts">
<delete dir="${basedir}/build/api" />
<delete dir="${basedir}/build/code-browser" />
<delete dir="${basedir}/build/coverage" />
<delete dir="${basedir}/build/logs" />
</target>
<target name="prepare" depends="clean,composer" description="Prepare for build">
<mkdir dir="${basedir}/build/api" />
<mkdir dir="${basedir}/build/code-browser" />
<mkdir dir="${basedir}/build/coverage" />
<mkdir dir="${basedir}/build/logs" />
</target>
<target name="composer" description="updates composer libs">
<exec dir="${basedir}" executable="sh" failonerror="true">
<arg value="-c" />
<arg value="curl -s http://getcomposer.org/installer | php" />
</exec>
<exec executable="php" failonerror="true">
<arg line="${basedir}/composer.phar install --no-ansi --no-interaction" />
</exec>
</target>
<target name="lint" description="Perform syntax check of sourcecode files">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}/app">
<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="phpunit" failonerror="true" />
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment