This repository has been archived by the owner on Apr 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
67 lines (50 loc) · 2.02 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
<project name="TWM-Email-PHP" default="compile" basedir=".">
<property environment="env"/>
<!-- App settings -->
<property name="app.name" value="TWM-Email-PHP"/>
<property name="app.version" value="1_0_4"/>
<!-- Property defaults -->
<property file="build.properties"/>
<property file="${user.home}/build.properties"/>
<!-- PHPDocumentor -->
<property name="php.home" value="${env.PHP_HOME}"/>
<property name="phpdoc.home" value="${env.PHPDOC_HOME}"/>
<!-- Build locations -->
<property name="build.home" value="build"/>
<property name="dist.home" value="dist"/>
<!-- All target -->
<target name="all" depends="clean,compile" description="Clean build and dist, then compile"/>
<!-- Clean target -->
<target name="clean" description="Delete old build and dist directories">
<delete dir="${build.home}"/>
<delete dir="${dist.home}"/>
</target>
<!-- Compile target -->
<target name="compile" depends="prepare" description="Compile Java sources">
<mkdir dir="${build.home}"/>
<copy todir="${build.home}/web">
<fileset dir="web" includes="**/*"/>
</copy>
<copy todir="${build.home}/docs">
<fileset dir="docs"/>
</copy>
<copy todir="${build.home}">
<fileset dir="etc" includes="README"/>
<fileset dir="etc" includes="LICENSE"/>
</copy>
<exec executable="${php.home}/cli/php.exe">
<arg line="${phpdoc.home}\\phpdoc -s on -d ${basedir}\\web -t ${build.home}\\docs\\api -dn ${app.name} -dc Uncategorized"/>
</exec>
</target>
<!-- Dist target -->
<target name="dist" depends="clean,compile" description="Create binary distribution">
<mkdir dir="${dist.home}"/>
<zip destfile="${dist.home}/${app.name}-${app.version}.zip" basedir="${build.home}"/>
</target>
<!-- Prepare target -->
<target name="prepare">
<mkdir dir="${build.home}"/>
<mkdir dir="${build.home}/web"/>
<mkdir dir="${build.home}/docs"/>
</target>
</project>