-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
84 lines (58 loc) · 2.63 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
83
84
<?xml version="1.0" encoding="UTF-8"?>
<project name="synology-dlm-tpb" default="build">
<autoloader />
<property environment="env" />
<property name="bin.dir" value="${project.basedir}/bin" />
<property name="dlm.dir" value="${project.basedir}/dlm" />
<property name="tmp.dir" value="${project.basedir}/tmp" />
<property name="tmp.bin.dir" value="${tmp.dir}/bin" />
<property name="tmp.obj.dir" value="${tmp.dir}/obj" />
<property name="tmp.out.dir" value="${tmp.dir}/out" />
<property name="tmp.test.dir" value="${tmp.dir}/test" />
<target name="prepare.version" depends="prepare.dlm">
<if>
<and>
<isset property="env.DLM_PACKAGE_VERSION" />
<not>
<equals arg1="${env.DLM_PACKAGE_VERSION}" arg2="0.0.0" />
</not>
</and>
<then>
<phing phingfile="build.xml" dir="./dlm" target="prepare.version" inheritAll="true" haltonfailure="true" />
</then>
</if>
</target>
<target name="prepare.dlm">
<composer command="update" composer="${bin.dir}/composer.phar">
<arg value="-q" />
<arg value="-d" />
<arg path="${dlm.dir}" />
<arg value="-n" />
</composer>
</target>
<target name="clean" depends="prepare.clean">
<phing phingfile="build.xml" dir="${dlm.dir}" target="clean" inheritAll="true" haltonfailure="true" />
</target>
<target name="prepare.clean" depends="prepare.dlm">
<delete dir="${tmp.dir}" includeemptydirs="true" quiet="true" failonerror="false" />
</target>
<target name="build" depends="prepare.build">
<phing phingfile="build.xml" dir="${dlm.dir}" target="build" inheritAll="true" haltonfailure="true" />
</target>
<target name="prepare.build" depends="prepare.dlm">
<mkdir dir="${tmp.dir}" />
<composer command="update" composer="${bin.dir}/composer.phar">
<arg value="-q" />
<arg value="-n" />
</composer>
</target>
<target name="test" depends="prepare.build">
<phing phingfile="build.xml" dir="${dlm.dir}" target="test" inheritAll="true" haltonfailure="true" />
</target>
<target name="rebuild" depends="prepare.clean,prepare.build">
<phing phingfile="build.xml" dir="${dlm.dir}" target="rebuild" inheritAll="true" haltonfailure="true" />
</target>
<target name="release" depends="prepare.clean,prepare.build">
<phing phingfile="build.xml" dir="${dlm.dir}" target="release" inheritAll="true" haltonfailure="true" />
</target>
</project>