This repository has been archived by the owner on Jan 12, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
41 lines (35 loc) · 1.72 KB
/
build.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Silex-JWT-Rest-Php" default="build">
<property name="builddir" value="${basedir}/build"/>
<property name="toolsdir" value="${builddir}/tools"/>
<target name="build" depends="prepare,composer,pdepend,phpunit"/>
<target name="clean" unless="clean.done" description="Cleanup build artifacts">
<delete dir="${basedir}/build/logs"/>
<delete dir="${basedir}/build/pdepend"/>
<property name="clean.done" value="true"/>
</target>
<target name="prepare" unless="prepare.done" depends="clean" description="Prepare for build">
<mkdir dir="${basedir}/build/logs"/>
<mkdir dir="${basedir}/build/pdepend"/>
<property name="prepare.done" value="true"/>
</target>
<target name="composer" unless="composer.noupdate" description="Run composer update">
<exec executable="composer">
<arg value="update"/>
</exec>
</target>
<target name="pdepend" depends="prepare" description="Calculate software metrics using PHP_Depend">
<exec executable="pdepend" taskname="pdepend">
<arg value="--jdepend-xml=${basedir}/build/logs/jdepend.xml" />
<arg value="--jdepend-chart=${basedir}/build/pdepend/dependencies.svg" />
<arg value="--overview-pyramid=${basedir}/build/pdepend/overview-pyramid.svg" />
<arg path="${basedir}/src" />
</exec>
</target>
<target name="phpunit" depends="prepare" description="Run unit tests with PHPUnit">
<exec executable="${basedir}/build/tools/phpunit.phar" failonerror="true" taskname="phpunit">
<arg value="--configuration"/>
<arg path="${basedir}/phpunit.xml"/>
</exec>
</target>
</project>