-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
builder.xml
65 lines (60 loc) · 2.33 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Override variables:
- Version number -Dbuild.version=0.0.0
All paths starts at the build folder
- Build dir -Dbuilddir=./../../packages/swsetgroup
- Sourcefiles -Dsrc=./..
- extension name without file postfix
-Dsrc.name=name
-->
<project default="build">
<property name="extension_name" value="SchuWeb_Birthday_Module" />
<!-- 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 = "XMLDATE" pattern = "%Y-%m-%d" />
</tstamp>
<!-- Set the directory where the packages should be saved. Relative to the build dir -->
<property name="builddir" value="./../packages/${extension_name}" override="true" />
<!-- Declare Project src files -->
<property name="src" value="./src" override="true" />
<property name="module" value="${src}/mod_sw_kbirthday" />
<property name="src.name" value="mod_schuweb_birthday" override="true" />
<fileset dir="${module}" id="module">
<include name="**" />
</fileset>
<target name="build" depends="prepare, copy">
<zip destfile="${builddir}/${extension_name}_v${build.version}_${build.date.DSTAMP}.zip">
<fileset dir="${builddir}/tmp/module">
<include name="**" />
</fileset>
</zip>
<delete dir="${builddir}/tmp" />
<echo msg="Zip ALL OK!" />
</target>
<target name="prepare">
<mkdir dir="${builddir}/tmp/module" />
<echo msg="Create temp folder OK!" />
</target>
<target name="copy">
<!-- copy the module -->
<copy todir="${builddir}/tmp/module">
<fileset refid="module" />
</copy>
<echo msg="Copy was successfull" />
<!-- insert version, date into the xml 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.XMLDATE}" />
</replaceregexp>
</filterchain>
</reflexive>
</target>
</project>