Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (39 sloc) 1.5 KB
<?xml version="1.0" encoding="UTF-8"?>
<project name="Brainfart" default="test">
<property name="dir_source" value="./library"/>
<property name="dir_build" value="./build"/>
<property name="dir_docs" value="${dir_build}/documentation"/>
<property name="dir_docs_report" value="${dir_docs}/coverage"/>
<property name="dir_docs_api" value="${dir_docs}/api"/>
<exec command="git describe --tags --abbrev=0" outputProperty="project_version"/>
<property name="build_project" value="Brainfart ${project_version}"/>
<echo msg="Building ${build_project}"/>
<!-- Target: prepare -->
<target name="prepare">
<delete dir="${dir_build}"/>
<delete dir="${dir_docs}"/>
<mkdir dir="${dir_build}"/>
<mkdir dir="${dir_docs}"/>
</target>
<!-- Target: test -->
<target name="test">
<delete dir="${dir_docs_report}"/>
<mkdir dir="${dir_docs_report}"/>
<exec command="phpunit" dir="./tests" checkreturn="true" passthru="true">
<arg line="--configuration phpunit.xml"/>
</exec>
</target>
<!-- Target: apidocs -->
<target name="apidocs" depends="test">
<delete dir="${dir_docs_api}"/>
<mkdir dir="${dir_docs_api}"/>
<apigen
source="${dir_source}"
destination="${dir_docs_api}"
title="${build_project} API"
php="false"
todo="true"
sourcecode="false"
/>
</target>
</project>