-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
82 lines (76 loc) · 3.21 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
74
75
76
77
78
79
80
81
82
<?xml version="1.0" encoding="UTF-8"?>
<project name="WebGuitarPro" default="build">
<resolvepath propertyName="root_path" file="./" />
<!-- <target name="install-production" depends="setup-backend-production,setup-frontend-production"></target> -->
<target name="install-production" depends="setup-backend-production,setup-frontend-production"></target>
<target name="install-staging" depends="setup-backend-staging,setup-frontend-staging"></target>
<target name="setup-frontend-production">
<exec executable="/usr/bin/yarn" returnProperty="yarn_install_output">
<arg value="install"/>
</exec>
<exec executable="/usr/bin/yarn" returnProperty="yarn_run_output">
<arg value="run"/>
<arg value="build"/>
</exec>
</target>
<target name="setup-frontend-staging">
<exec executable="/usr/bin/yarn" returnProperty="yarn_install_output">
<arg value="install"/>
</exec>
<exec executable="/usr/bin/yarn" returnProperty="yarn_run_output">
<arg value="run"/>
<arg value="dev"/>
</exec>
</target>
<target name="setup-backend-production">
<if>
<available file="${root_path}/vendor" type="dir" />
<then>
<exec executable="/usr/local/bin/composer" returnProperty="vendors_output">
<arg value="update"/>
<arg value="--no-dev"/>
<arg value="--no-scripts"/>
<arg value="--no-interaction"/>
<arg value="--prefer-dist"/>
</exec>
</then>
<else>
<exec executable="/usr/local/bin/composer" returnProperty="vendors_output">
<arg value="install"/>
<arg value="--no-dev"/>
<arg value="--no-scripts"/>
<arg value="--no-interaction"/>
<arg value="--prefer-dist"/>
</exec>
</else>
</if>
</target>
<target name="setup-backend-staging">
<if>
<available file="${root_path}/vendor" type="dir" />
<then>
<exec executable="/usr/local/bin/composer" returnProperty="vendors_output">
<arg value="update"/>
<arg value="--no-scripts"/>
<arg value="--no-interaction"/>
<arg value="--prefer-dist"/>
</exec>
</then>
<else>
<exec executable="/usr/local/bin/composer" returnProperty="vendors_output">
<arg value="install"/>
<arg value="--no-scripts"/>
<arg value="--no-interaction"/>
<arg value="--prefer-dist"/>
</exec>
</else>
</if>
</target>
<target name="run-tests">
<exec command="phpunit -c app" checkreturn="true" />
<exec executable="/usr/local/bin/phpunit" checkreturn="true">
<arg value="-c"/>
<arg value="app"/>
</exec>
</target>
</project>