forked from pyrocms/pyrocms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
68 lines (58 loc) · 2.46 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="PyroCMS" default="dist" basedir="." description="Create download ZIP and TAR from PyroCMS source code">
<property name="sourcedir" value="./build/source" override="true" />
<!-- ============================================ -->
<!-- Target: prepare -->
<!-- ============================================ -->
<target name="prepare">
<echo msg="Making directory ./build" />
<mkdir dir="./build" />
<mkdir dir="${sourcedir}" />
</target>
<!-- Fileset for all files -->
<fileset dir="." id="allfiles">
<include name="addons/**" />
<include name="assets/**" />
<include name="installer/**" />
<include name="system/**" />
<include name="uploads/**" />
<include name=".htaccess" />
<include name="index.php" />
<include name="LICENSE" />
<include name="*.md" />
<exclude name=".DS_Store" />
</fileset>
<!-- ============================================ -->
<!-- Target: build -->
<!-- ============================================ -->
<target name="build" depends="prepare">
<copy todir="${sourcedir}">
<fileset refid="allfiles" />
</copy>
</target>
<!-- ============================================ -->
<!-- Target: Rebuild -->
<!-- ============================================ -->
<target name="rebuild" description="rebuilds this package">
<delete dir="${sourcedir}" />
<phingcall target="build" />
</target>
<!-- ============================================ -->
<!-- (DEFAULT) Target: dist -->
<!-- ============================================ -->
<target name="dist" depends="build">
<echo msg="Creating .tar.gz archive..." />
<tar destfile="./build/release.tar.gz" basedir="." compression="gzip" includeemptydirs="true">
<fileset dir="${sourcedir}">
<include name="**/**" />
</fileset>
</tar>
<echo msg="Creating .zip archive..." />
<zip destfile="./build/release.zip" basedir="." includeemptydirs="true">
<fileset dir="${sourcedir}">
<include name="**/**" />
</fileset>
</zip>
<echo msg="Files copied and compressed in build directory OK!" />
</target>
</project>