forked from cepa/dojo-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
73 lines (62 loc) · 2.05 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="dojo-tutorial" default="build">
<property file="build.properties" />
<target name="download-composer">
<if>
<available file="composer.phar" type="file" />
<then>
<echo msg="File composer.phar already exists, skipping."/>
</then>
<else>
<exec
command="curl -s http://getcomposer.org/installer | php"
dir="."
passthru="true"
checkreturn="true"/>
</else>
</if>
</target>
<target name="update-composer" depends="download-composer">
<exec
command="php composer.phar update"
dir="."
passthru="true"
checkreturn="true"/>
</target>
<target name="clean">
</target>
<target name="prepare" depends="update-composer">
</target>
<target name="linter">
<apply executable="php" failonerror="true">
<arg value="-l" />
<fileset dir=".">
<include name="**/*.php" />
<exclude name="vendor/" />
</fileset>
</apply>
</target>
<target name="test" depends="linter">
<exec
command="phpunit"
dir="./"
passthru="true"
checkreturn="true"/>
</target>
<target name="build" depends="clean, prepare">
</target>
<target name="dist" depends="build">
<exec command="rm -f dist.tar*" />
<tar destfile="dist.tar">
<fileset dir=".">
<include name="**/**" />
<exclude name="**/.git" />
<exclude name="build.properties" />
</fileset>
</tar>
<exec command="gzip dist.tar" passthru="true" checkreturn="true" />
</target>
<target name="deploy" depends="dist">
<exec command="fab -u ${fabric.user} -H ${fabric.hosts} ${fabric.commands}" passthru="true" checkreturn="true" />
</target>
</project>