-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
56 lines (56 loc) · 1.99 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
<?xml version="1.0" encoding="UTF-8" ?>
<project name="auto-crud" default="all" basedir=".">
<property file="build.properties"/>
<target name="init">
<tstamp/>
<mkdir dir="${output.dir}"/>
<mkdir dir="${logs.dir}"/>
</target>
<target name="all" description="Build the project">
<antcall target="init"/>
<antcall target="compile"/>
<antcall target="clean"/>
<antcall target="copy"/>
</target>
<target name="clean" description="Clean the project">
<delete includeemptydirs="true" quiet="true">
<fileset dir="${output.dir}" includes="**/*"/>
</delete>
</target>
<target name="copy">
<copy todir="${output.dir}" overwrite="yes" includeemptydirs="true">
<fileset dir="${source.dir}">
<exclude name="**/.git"/>
<exclude name="**/.git/**"/>
<exclude name="**/*.swp"/>
</fileset>
</copy>
</target>
<target name="compile">
<!-- <replaceregexp match="\$version\$" replace="${version}" flags="g" byline="true" file="${source.dir}/common/config.php" /> -->
<replaceregexp flags="g" byline="true" match="${version.old}" replace="${version.new}">
<fileset dir="${source.dir}">
<include name="**/*.php"/>
</fileset>
</replaceregexp>
<apply executable="/usr/bin/php" failonerror="true" taskname="php-compile">
<arg value="-l"/>
<fileset dir="${source.dir}">
<include name="**/*.php"/>
</fileset>
</apply>
</target>
<target name="tests">
<exec dir="${test.dir}" executable="/usr/bin/phpunit" failonerror="true" taskname="phpunit">
<arg line="--log-metrics ${logs.dir}/metrics.xml
--coverage-clover ${logs.dir}/clover.xml
--coverage-html ${logs.dir}/coverage
mysqlClassTest" />
</exec>
</target>
<target name="docs">
<exec dir="." executable="/usr/bin/phpdoc" failonerror="true" taskname="phpdocs">
<arg line="-q -ct type -ue off -t ${docs.dir} -o HTML:Smarty:PHP -d ${source.dir} -ti auto-crud" />
</exec>
</target>
</project>