-
Notifications
You must be signed in to change notification settings - Fork 709
/
build.xml
78 lines (66 loc) · 2.36 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
76
77
78
<?xml version="1.0" encoding="UTF-8"?>
<project name="MantisBT" default="test">
<includepath classpath="phing/tasks"/>
<taskdef name="extractMantisBTVersion" classname="mantisbt.ExtractMantisBTVersion"/>
<target name="init">
<mkdir dir="build"/>
</target>
<target name="test" depends="init">
<mkdir dir="build/test"/>
<phpunit printsummary="true" bootstrap="tests/bootstrap.php">
<formatter usefile="false" type="plain"/>
<formatter todir="build/test" type="xml"/>
<batchtest classpath="tests:core:core/classes:library">
<fileset dir="tests">
<include name="**/*Test.php"/>
</fileset>
</batchtest>
</phpunit>
</target>
<!-- requires a 512M memory limit to complete -->
<target name="phpdoc" depends="init">
<mkdir dir="build/phpdoc"/>
<phpdoc title="MantisBT API Docs" sourcecode="yes" destdir="build/phpdoc"
output="HTML:Smarty:PHP">
<fileset dir=".">
<include name="core/**/*.php" />
<include name="plugins/**/*.php" />
<include name="api/**/*.php" />
</fileset>
</phpdoc>
</target>
<target name="package" depends="init">
<extractMantisBTVersion file="core/constant_inc.php"/>
<tar destfile="build/mantisbt-${mantisbtversion}.tar.gz" compression="gzip">
<fileset dir=".">
<!-- directories which should not be deployed -->
<exclude name="build/**"/>
<exclude name="doc/**"/>
<exclude name="docbook/**"/>
<exclude name="packages/**"/>
<exclude name="phing/**"/>
<exclude name="tests/**"/>
<!-- customisations and IDE settings -->
<exclude name="config_inc.php"/>
<exclude name="custom_constant_inc.php"/>
<exclude name="custom_strings_inc.php"/>
<exclude name="custom_functions_inc.php"/>
<exclude name="mantis_offline.php"/>
<exclude name="web.config"/>
<exclude name=".*"/>
<exclude name=".settings/**"/>
<!-- git repo -->
<exclude name=".git/**"/>
<!-- build file -->
<exclude name="phing.xml"/>
</fileset>
</tar>
<filehash file="build/mantisbt-${mantisbtversion}.tar.gz" hashtype="1" />
<echo file="build/mantisbt-${mantisbtversion}.tar.gz.sha1" msg="${filehashvalue}"/>
<filehash file="build/mantisbt-${mantisbtversion}.tar.gz" hashtype="0" />
<echo file="build/mantisbt-${mantisbtversion}.tar.gz.md5" msg="${filehashvalue}"/>
</target>
<target name="clean">
<delete dir="build"/>
</target>
</project>