This repository has been archived by the owner on Aug 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
68 lines (60 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="phpIPN" default="dist">
<property file="build.properties" />
<property name="builddir" value="${build.directory}" override="true" />
<property name="outputfile" value="${phing.project.name}-${project.version}" override="true" />
<!-- Fileset for all files -->
<fileset dir="." id="allfiles">
<include name="INSTALL" />
<include name="README" />
<include name="admin/**" />
<include name="include/**" />
<include name="index.html" />
<include name="licence.txt" />
<include name="notify.php" />
<include name="templates/**" />
</fileset>
<!-- ============================================ -->
<!-- Target: Rebuild -->
<!-- ============================================ -->
<target name="clean" description="clean this project">
<delete dir="${builddir}" />
<!-- <phingcall target="main" /> -->
</target>
<!-- ============================================ -->
<!-- Target: build -->
<!-- ============================================ -->
<target name="build" depends="test">
<echo msg="Copying files to build directory..." />
<copy todir="${builddir}">
<fileset refid="allfiles" />
</copy>
</target>
<!-- ============================================ -->
<!-- (DEFAULT) Target: dist -->
<!-- ============================================ -->
<target name="dist" depends="clean,build" description="Do everything and create a deployable artefact">
<echo msg="Creating archive..." />
<tar destfile="${builddir}/${outputfile}.tar.gz" compression="gzip">
<fileset dir="${builddir}">
<include name="*" />
</fileset>
</tar>
<echo msg="Files copied and compressed in build directory OK!" />
</target>
<target name="test" description="run the tests">
<mkdir dir="./reports"/>
<echo msg="Running tests..."/>
<phpunit haltonfailure="true" haltonerror="true">
<!-- <formatter todir="reports" type="xml"/> -->
<formatter type="plain" usefile="false"/>
<batchtest>
<fileset dir="tests">
<include name="**/*Test.php"/>
<exclude name="**/DBManagerTest.php"/>
<!-- <include name="**/*Test.php"/> -->
</fileset>
</batchtest>
</phpunit>
</target>
</project>