forked from jeroenverfallie/solr-query-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
59 lines (48 loc) · 1.89 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<project name="solr-query-builder" default="build" basedir=".">
<description>
Buildfile for swiss-php-friends/solr-query-builder
</description>
<!-- set global properties for this build -->
<property name="lib_dir" location="lib"/>
<property name="test_dir" location="test"/>
<property name="api_doc_dir" location="doc/api"/>
<property name="coverage_doc_dir" location="doc/coverage"/>
<!-- main targets -->
<target name="build" depends="-init, -install, phpunit, phpdoc" description="build the lib" >
</target>
<target name="build-travis" depends="-init, phpunit" description="build the lib using travis" >
</target>
<target name="phpunit" depends="-install">
<exec executable="vendor/bin/phpunit" failonerror="true">
<arg line="--coverage-html ${coverage_doc_dir} ${test_dir}" />
</exec>
</target>
<target name="phpdoc" depends="-install">
<exec executable="vendor/bin/phpdoc" failonerror="true">
<arg line="-d ${lib_dir} -t ${api_doc_dir} --template='responsive-twig'" />
</exec>
</target>
<!-- helpers -->
<target name="-init" depends="-clean">
<tstamp/>
<mkdir dir="${api_doc_dir}"/>
<mkdir dir="${coverage_doc_dir}"/>
</target>
<target name="-clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${api_doc_dir}"/>
<delete dir="${coverage_doc_dir}"/>
</target>
<target name="-install" depends="-getcomposer">
<exec executable="php" failonerror="true">
<arg line="composer.phar install --dev"/>
</exec>
</target>
<target name="-getcomposer">
<exec executable="/bin/bash">
<arg value="-c" />
<arg value="curl -s https://getcomposer.org/installer | php" />
</exec>
</target>
</project>