-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
60 lines (50 loc) · 2.88 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
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="appserver-io/routlt" default="composer-init" basedir=".">
<!-- initialize ENV variable -->
<property environment="env" />
<!-- initialize file based properties -->
<property file="${basedir}/build.properties"/>
<property file="${basedir}/build.default.properties"/>
<property file="${basedir}/build.${os.family}.properties"/>
<!-- initialize the library specific properties -->
<property name="codepool" value="vendor"/>
<!-- initialize the directory where we can find the real build files -->
<property name="vendor.dir" value ="${basedir}/${codepool}" />
<property name="build.dir" value="${vendor.dir}/appserver-io/build" />
<!-- ==================================================================== -->
<!-- Import the common build configuration file -->
<!-- ==================================================================== -->
<import file="${build.dir}/common.xml" optional="true"/>
<!-- ==================================================================== -->
<!-- Checks if composer has installed it's dependencies -->
<!-- ==================================================================== -->
<target name="is-composer-installed">
<condition property="composer.present">
<available file="${build.dir}" type="dir"/>
</condition>
</target>
<!-- ==================================================================== -->
<!-- Installs all dependencies defined in composer.json -->
<!-- ==================================================================== -->
<target name="composer-install" depends="is-composer-installed" unless="composer.present" description="Installs all dependencies defined in composer.json">
<exec dir="${basedir}" executable="composer">
<arg line="--no-interaction --dev install"/>
</exec>
</target>
<!-- ==================================================================== -->
<!-- Updates composer dependencies defined in composer.json -->
<!-- ==================================================================== -->
<target name="composer-update" depends="is-composer-installed" if="composer.present" description="Updates composer dependencies defined in composer.json">
<exec dir="${basedir}" executable="composer">
<arg line="--no-interaction --dev update"/>
</exec>
</target>
<!-- ===================================================================== -->
<!-- Checks if the build- and deployment stub has already been initialized -->
<!-- ===================================================================== -->
<target name="composer-init">
<antcall target="composer-install"/>
<antcall target="composer-update"/>
</target>
</project>