-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
builder.xml
123 lines (115 loc) · 5.37 KB
/
builder.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?xml version="1.0" encoding="UTF-8"?>
<!--
Override variables:
- Version number -Dbuild.version=0.0.0
-->
<project name="schuweb_sitemap" default="build">
<!-- Version number of build -->
<property name="build.version" value="0.0.0" override="true"/>
<!-- get the date for build -->
<tstamp prefix="build.date">
<format property="DATE" pattern="dd. MMMM yyyy" locale="en_GB"/>
</tstamp>
<!-- Set the directory where the packages should be saved. Relative to the build dir -->
<property name="builddir" value="./../packages/SchuWeb_Sitemap" override="true"/>
<fileset dir="src/administrator/components/com_schuweb_sitemap" id="schuweb_sitemap_admin">
<include name="**"/>
</fileset>
<fileset dir="src/components/com_schuweb_sitemap" id="schuweb_sitemap_front">
<include name="**"/>
</fileset>
<fileset dir="src/media/com_schuweb_sitemap" id="schuweb_sitemap_media">
<include name="**"/>
</fileset>
<fileset dir="src/libraries/schuweb_sitemap" id="schuweb_sitemap_lib">
<include name="**"/>
</fileset>
<target name="build" depends="prepare, copy">
<zip destfile="${builddir}/tmp/packages/com_schuweb_sitemap_${build.version}_${build.date.DSTAMP}.zip">
<fileset dir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap">
<include name="**"/>
</fileset>
</zip>
<zip destfile="${builddir}/tmp/packages/lib_schuweb_sitemap_${build.version}_${build.date.DSTAMP}.zip">
<fileset dir="${builddir}/tmp/schuweb_sitemap/lib">
<include name="**"/>
</fileset>
</zip>
<zip destfile="${builddir}/tmp/packages/plg_content_${build.version}_${build.date.DSTAMP}.zip">
<fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/content">
<include name="**"/>
</fileset>
</zip>
<zip destfile="${builddir}/tmp/packages/plg_newsfeeds_${build.version}_${build.date.DSTAMP}.zip">
<fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/newsfeeds">
<include name="**"/>
</fileset>
</zip>
<zip destfile="${builddir}/tmp/packages/plg_task_schuwebsitemap_${build.version}_${build.date.DSTAMP}.zip">
<fileset dir="${builddir}/tmp/schuweb_sitemap/plugins/schuwebsitemap">
<include name="**"/>
</fileset>
</zip>
<zip destfile="${builddir}/pkg_schuweb_sitemap_${build.version}_${build.date.DSTAMP}.zip">
<fileset dir="${builddir}/tmp">
<include name="packages/*.zip"/>
<include name="*.xml"/>
<include name="install.script.php" />
</fileset>
</zip>
<delete dir="${builddir}/tmp"/>
<echo msg="Zip ALL OK!"/>
</target>
<target name="prepare">
<mkdir dir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap/admin"/>
<mkdir dir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap/site"/>
<mkdir dir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap/media"/>
<mkdir dir="${builddir}/tmp/schuweb_sitemap/lib/"/>
<mkdir dir="${builddir}/tmp/schuweb_sitemap/plugins/"/>
<mkdir dir="${builddir}/tmp/packages/"/>
<echo msg="Create temp folder OK!"/>
</target>
<target name="copy">
<copy todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap/admin">
<fileset refid="schuweb_sitemap_admin"/>
</copy>
<copy todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap/site">
<fileset refid="schuweb_sitemap_front"/>
</copy>
<copy todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap/media">
<fileset refid="schuweb_sitemap_media"/>
</copy>
<copy todir="${builddir}/tmp/schuweb_sitemap/lib">
<fileset refid="schuweb_sitemap_lib"/>
</copy>
<copy file="src/administrator/components/com_schuweb_sitemap/schuweb_sitemap.xml" todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap" />
<copy file="src/pkg_schuweb_sitemap.xml" tofile="${builddir}/tmp/pkg_schuweb_sitemap.xml" />
<copy file="src/install.script.php" todir="${builddir}/tmp" />
<copy file="src/extension.script.php" todir="${builddir}/tmp/schuweb_sitemap/schuweb_sitemap" />
<copy todir="${builddir}/tmp/schuweb_sitemap/plugins">
<fileset dir="src/plugins/schuweb_sitemap">
<include name="content/**"/>
<include name="newsfeeds/**"/>
</fileset>
</copy>
<copy todir="${builddir}/tmp/schuweb_sitemap/plugins">
<fileset dir="src/plugins/task">
<include name="schuwebsitemap/**"/>
</fileset>
</copy>
<echo msg="Copy was successfull"/>
<!-- insert version, build number and date into files -->
<reflexive>
<fileset dir="${builddir}/tmp/">
<include name="**"/>
</fileset>
<filterchain>
<replaceregexp>
<regexp pattern="sw\.build\.version" replace="${build.version}"/>
<regexp pattern="sw\.build\.date" replace="${build.date.DATE}"/>
<regexp pattern="sw\.build\.dstamp" replace="${build.date.DSTAMP}"/>
</replaceregexp>
</filterchain>
</reflexive>
</target>
</project>