-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
77 lines (64 loc) · 2.17 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
<?xml version="1.0" encoding="utf-8"?>
<project default="build">
<property name="component.name" value="donationgauge"/>
<property name="component.dir" value="com_${component.name}"/>
<property name="build.dir" value="build" />
<property name="package.dir" value="package" />
<target name="_init">
<property file="build_config.properties" override="true" />
</target>
<target name="build" depends="_init">
<mkdir dir="${build.dir}" />
<delete dir="${build.dir}/${component.dir}" />
<phingcall target="_media" />
<copy todir="${build.dir}/${component.dir}/site" haltonerror="false">
<fileset dir="${source.dir}/components/${component.dir}">
<include name="**/*" />
</fileset>
</copy>
<copy todir="${build.dir}/${component.dir}/admin" haltonerror="false">
<fileset dir="${source.dir}/administrator/components/${component.dir}">
<include name="**/*" />
</fileset>
</copy>
<move file="${build.dir}/${component.dir}/admin/${component.name}.xml" todir="${build.dir}/${component.dir}" />
<phingcall target="_updateTree" />
<delete dir="${build.dir}" includeemptydirs="true" failonerror="false" />
</target>
<target name="package">
<mkdir dir="${package.dir}" />
<zip destfile="${package.dir}/${component.dir}_${version}.zip">
<fileset dir="${component.dir}">
<include name="**/*" />
</fileset>
</zip>
</target>
<target name="_media">
<available file="${source.dir}/media/${component.dir}" type="dir" property="source.media.available" value="true" />
<if>
<equals arg1="${source.media.available}" arg2="1" />
<then>
<copy todir="${build.dir}/${name}/media" haltonerror="false">
<fileset dir="${source.dir}/media/${project.dir}">
<include name="**/*" />
</fileset>
</copy>
</then>
</if>
</target>
<target name="_updateTree" depends="_cleanTree">
<copy todir="${component.dir}">
<fileset dir="${build.dir}/${component.dir}">
<include name="**/*" />
</fileset>
</copy>
</target>
<target name="_cleanTree">
<delete includeemptydirs="true">
<fileset dir="${component.dir}">
<include name="*" />
<include name="*/**" />
</fileset>
</delete>
</target>
</project>