forked from mathiasverraes/jdump
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
75 lines (62 loc) · 2.59 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
<?xml version="1.0" ?>
<project name="J!Dump" basedir="." default="package" description="Build J!Dump packages">
<target name="init" description="Initialize" depends="clean">
<property file="VERSION" override="false" />
<tstamp/>
<mkdir dir="build" />
<filterchain id="replacer">
<replacetokens begintoken="%%" endtoken="%%">
<token key="VERSION" value="${version}"/>
</replacetokens>
<replacetokens begintoken="%%" endtoken="%%">
<token key="TODAY" value="${TODAY}"/>
</replacetokens>
</filterchain>
</target>
<target name="clean" description="Cleanup">
<delete dir="build" includeemptydirs="true" />
</target>
<target name="package-component" description="Build the component package" depends="init">
<mkdir dir="build/packages" />
<mkdir dir="build/packages/tmp" />
<copy todir="build/packages/tmp" >
<fileset dir="./src/">
<include name="administrator/**" />
<include name="components/**" />
<!--
<include name="media/**" />
-->
</fileset>
<filterchain refid="replacer" />
</copy>
<move file="build/packages/tmp/administrator/components/com_dump/dump.xml" tofile="build/packages/tmp/dump.xml" />
<zip destfile="build/packages/com_dump_v${version}.zip" basedir="build/packages/tmp" />
<delete dir="build/packages/tmp" includeemptydirs="true" />
</target>
<target name="package-plugin" description="Build the plugin package" depends="init">
<mkdir dir="build/packages" />
<mkdir dir="build/packages/tmp" />
<copy todir="build/packages/tmp" >
<fileset dir="./src/plugins/">
<include name="system/dump/**" />
</fileset>
<filterchain refid="replacer" />
</copy>
<zip destfile="build/packages/plg_system_dump_v${version}.zip" basedir="build/packages/tmp/system/dump" />
<delete dir="build/packages/tmp" includeemptydirs="true" />
</target>
<target name="package" description="Package the whole shebang" depends="package-plugin, package-component">
<mkdir dir="build/packages/tmp" />
<copy todir="build/packages/tmp" >
<fileset dir="./">
<include name="README.md" />
<include name="VERSION" />
</fileset>
<filterchain refid="replacer" />
</copy>
<move file="build/packages/plg_system_dump_v${version}.zip" tofile="build/packages/tmp/plg_system_dump_v${version}.zip" overwrite="true"/>
<move file="build/packages/com_dump_v${version}.zip" tofile="build/packages/tmp/com_dump_v${version}.zip" overwrite="true"/>
<zip destfile="build/packages/unzip_first_jdump_v${version}.zip" basedir="build/packages/tmp" />
<delete dir="build/packages/tmp" includeemptydirs="true" />
</target>
</project>