Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 58 lines (47 sloc) 1.664 kb
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
<?xml version="1.0" encoding="UTF-8"?>

<project name="MyFirstPrestaModule" default="build">

<!-- describe the way running phpunit & generate coverage -->
<target name="build" depends="prepare,phpunit" />
<target name="clean" description="Cleanup build artefacts">
<delete dir="${basedir}/build/coverage" />
<delete dir="${basedir}/build/logs" />
</target>

<target name="prepare" depends="clean,phpab" description="Prepare the build">
<mkdir dir="${basedir}/build/coverage" />
<mkdir dir="${basedir}/build/logs" />
</target>

<!-- describe the way to launch Php Autoloader script -->

<target name="phpab"
description="Generate Autoloader Script">
<exec executable="phpab">
<arg value="--output" />
<arg path="${basedir}/build/src/autoload.php" />
<arg value="--template" />
<arg path="${basedir}/build/src_autoload.php.in" />
<arg path="${basedir}/src" />
</exec>

<exec executable="phpab">
<arg value="--output" />
<arg path="${basedir}/tests/autoload.php" />
<arg value="--template" />
<arg path="${basedir}/build/tests_autoload.php.in" />
<arg path="${basedir}/tests" />
</exec>
</target>

<!-- describe the way to luanch Phpunit -->
<target name="phpunit" description="Run unit test with Phpunit">
<exec executable="phpunit" failonerror="true" />
</target>

<!-- describe the way check syntax -->
<target name="lint">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir="${basedir}/src">
<include name="**/*.php" />
</fileset>

<fileset dir="${basedir}/tests">
<include name="**/*.php" />
</fileset>
</apply>
</target>
</project>

Something went wrong with that request. Please try again.