-
Notifications
You must be signed in to change notification settings - Fork 19
/
phing.xml
70 lines (59 loc) · 2.95 KB
/
phing.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="ai-controller-frontend extension" default="all">
<target name="test" description="Executes unit tests" depends="clean">
<echo msg="Executing unit tests" />
<exec command="${bindir}phpunit -d memory_limit=-1 --include-path ${coredir} --configuration=phpunit.xml"
dir="tests" checkreturn="true" logoutput="true" passthru="true" />
</target>
<target name="coverage" description="Generates the code coverage report" depends="clean">
<echo msg="Generating code coverage report" />
<exec command="${bindir}phpunit -d memory_limit=-1 --include-path ${coredir} --configuration=phpunit-coverage.xml"
dir="tests" checkreturn="true" logoutput="true" passthru="true" />
</target>
<target name="check" description="Executes code sniffer">
<echo msg="Executing code sniffer" />
<exec command="${bindir}phpcs -n --standard=${codestddir}/Aimeos src tests/*/"
checkreturn="true" logoutput="true" passthru="true" />
</target>
<target name="clean" description="Executes all deployment tasks">
<delete file="tests/confdoc.ser" quiet="true" failonerror="false" />
<delete file="tests/coverage.xml" quiet="true" failonerror="false" />
<delete dir="tests/tmp" quiet="true" failonerror="false" />
<delete quiet="true" failonerror="false" >
<fileset dir="tests">
<include name="*.log" />
</fileset>
</delete>
</target>
<target name="i18n" description="Creates translation message files">
<exec command="find ./src/ -type f | xgettext -j -s --no-location --no-wrap --add-comments=/ --language=PHP --from-code=UTF-8 --keyword=sprintf:1 -o i18n/controller-frontend.pot -f -"
checkreturn="true" logoutput="true" />
<foreach param="po-fname" absparam="po-filename" target="i18n-update">
<fileset dir="./i18n">
<include name="*.po" />
</fileset>
</foreach>
</target>
<target name="i18n-update" description="Updates translation message files">
<fail unless="po-filename" message="Missing file name" />
<echo msg="File: ${po-filename}" />
<exec command="msgmerge --no-wrap -s -U --backup=none ${po-filename} i18n/controller-frontend.pot"
checkreturn="true" logoutput="true" />
</target>
<target name="build" description="Builds package for deployment">
<exec command="tx pull -a -f --minimum-perc=1" checkreturn="true" logoutput="true" />
<foreach param="po-fname" absparam="po-filename" target="build-mo">
<fileset dir="./i18n">
<include name="*.po" />
</fileset>
</foreach>
</target>
<target name="build-mo" description="Generates binary translation files">
<fail unless="po-filename" message="Missing file name" />
<echo msg="File: ${po-filename}" />
<exec command="msgfmt --statistics -c -o `echo ${po-filename} | sed s/\.po//` ${po-filename}"
checkreturn="true" logoutput="true" />
</target>
<target name="all" depends="coverage" description="Builds all parts of the package">
</target>
</project>