This repository has been archived by the owner on Mar 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathbuild.xml
71 lines (62 loc) · 2.4 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
<project name="Flagbit_Faq" default="deploy" basedir=".">
<property file="build.properties"/>
<property file="build.default.properties"/>
<property name="srcdir" value="${basedir}/src"/>
<property name="builddir" value="${basedir}/build"/>
<property name="docdir" value="${basedir}/doc"/>
<target name="prepare">
<replaceregexp file="${srcdir}/app/code/community/Flagbit/Faq/etc/config.xml"
match="(<version>)(.*)(</version>)" replace="\1${package.version}\3"/>
<tstamp>
<format property="package.date" pattern="yyyy-MM-dd"/>
</tstamp>
<tstamp>
<format property="package.time" pattern="HH:mm:ss"/>
</tstamp>
<replaceregexp file="${basedir}/package.xml"
match="(<(date)>).*?(</\2>)" replace="\1${package.date}\3" />
<replaceregexp file="${basedir}/package.xml"
match="(<(time)>).*?(</\2>)" replace="\1${package.time}\3" />
<replaceregexp file="${basedir}/package.xml"
match="(<version>.*?<(release)>).*?(</\2>.*?<(api)>).*?(</\4>.*?</version>)"
replace="\1${package.version}\3${package.version}\5" flags="gs" />
</target>
<target name="package" depends="prepare" description="Creates a PEAR package">
<copy file="${basedir}/package.xml" tofile="${srcdir}/package.xml"/>
<exec dir='${srcdir}/' executable="${pear}">
<arg value="mpx"/>
</exec>
<copy file="${srcdir}/package.xml" tofile="${basedir}/package.xml"/>
<exec dir="${srcdir}" executable="${pear}">
<arg value="mage-package"/>
</exec>
<delete file="${srcdir}/package.xml"/>
<move file="${srcdir}/${ant.project.name}-${package.version}.tgz" todir="${builddir}"/>
</target>
<target name="deploy" depends="prepare">
<copy todir="${deploydir}" overwrite="yes" verbose="yes">
<fileset dir="${srcdir}">
<include name="**/*"/>
<exclude name="**/.svn/**"/>
<exclude name="var/log/**"/>
</fileset>
</copy>
</target>
<target name="phpdoc" description="Generates the documentation">
<delete dir="${docdir}" />
<exec executable="${php}" dir="${srcdir}/app">
<arg value="${phpdoc}" />
<arg value="-ct" />
<arg value="override" />
<arg value="-f" />
<arg value="*.php" />
<arg value="-t" />
<arg value="${docdir}" />
<arg value="-ti" />
<arg value="${ant.project.name}" />
<arg value="-s" />
<arg value="-o" />
<arg value="${phpdoc.output}" />
</exec>
</target>
</project>