-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
58 lines (53 loc) · 2.42 KB
/
build.xml
File metadata and controls
58 lines (53 loc) · 2.42 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
58
<?xml version="1.0" encoding="UTF-8"?>
<project name="Tests and documentation" default="main">
<target name="main">
<property name="composer.IS_FILE_EXISTS" value="false" />
<exec command="if [ -f 'composer.phar' ]; then echo 'true'; else echo 'false'; fi;" outputProperty="composer.IS_FILE_EXISTS" />
<if>
<equals arg1="${composer.IS_FILE_EXISTS}" arg2="true" />
<then>
<echo>[x] Composer found</echo>
</then>
<else>
<exec command="curl https://getcomposer.org/composer.phar -O" />
<echo>[x] Composer downloaded to 'composer.phar' file</echo>
</else>
</if>
<property name="composer.vendor.IS_DIR_EXISTS" value="false" />
<exec command="if [ -d 'vendor' ]; then echo 'true'; else echo 'false'; fi;" outputProperty="composer.vendor.IS_DIR_EXISTS" />
<if>
<equals arg1="${composer.vendor.IS_DIR_EXISTS}" arg2="true" />
<then>
<echo>[x] "vendor" folder found</echo>
</then>
<else>
<composer command="install" />
</else>
</if>
<property name="phpunit.phar.IS_FILE_EXISTS" value="false" />
<exec command="if [ -f 'phpunit.phar' ]; then echo 'true'; else echo 'false'; fi;" outputProperty="phpunit.phar.IS_FILE_EXISTS" />
<if>
<equals arg1="${phpunit.phar.IS_FILE_EXISTS}" arg2="true" />
<then>
<echo>[x] "phpunit.phar" file found</echo>
</then>
<else>
<exec command="curl https://phar.phpunit.de/phpunit.phar -O -L" />
</else>
</if>
<property name="apigen.phar.IS_FILE_EXISTS" value="false" />
<exec command="if [ -f 'apigen.phar' ]; then echo 'true'; else echo 'false'; fi;" outputProperty="apigen.phar.IS_FILE_EXISTS" />
<if>
<equals arg1="${apigen.phar.IS_FILE_EXISTS}" arg2="true" />
<then>
<echo>[x] "apigen.phar" file found</echo>
</then>
<else>
<exec command="curl http://apigen.org/apigen.phar -O -L" />
</else>
</if>
<delete dir="build" quiet="true" />
<exec command="php phpunit.phar" passthru="true" />
<exec command="php apigen.phar generate --source=src/ --destination=build/docs/" passthru="true" />
</target>
</project>