-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
78 lines (62 loc) · 2.31 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"?>
<project name="eCollecte" default="build" basedir="." description="eCollecte.">
<property file="./build.properties" />
<!-- Prepare build folders -->
<target name="prepare" description="Create directories">
<mkdir dir="docs"/>
<mkdir dir="reports"/>
<mkdir dir="build"/>
<echo msg="Making docs, report and build directories"/>
</target>
<!-- run all symfony related commands to update local installation -->
<target name="build" depends="prepare" description="Build application from codebase">
<!-- composer install -->
<composer command="install" composer="${composer.bin.path}">
<arg value="--optimize-autoloader" />
</composer>
<echo msg="composer install."/>
<!-- database update -->
<SymfonyConsole command="doctrine:schema:update">
<arg name="force"/>
</SymfonyConsole>
<echo msg="app/console doctrine:schema:update --force"/>
<!-- dump assets -->
<SymfonyConsole command="assetic:dump">
<arg name="env" value="${symfony.env}" />
</SymfonyConsole>
<echo msg="app/console assetic:dump"/>
<!-- produce gulp resources -->
<exec command="gulp" dir="." />
<echo msg="glup compilation task"/>
<!-- clear cache -->
<SymfonyConsole command="cache:clear">
<arg name="env" value="${symfony.env}" />
</SymfonyConsole>
<echo msg="app/console cache:clear"/>
</target>
<!-- generate documentation -->
<target name="doc" depends="prepare" description="Generate documentation">
<phpdoc2 title="eCollecte" destdir="docs">
<fileset dir="src">
<include name="**/*.php"/>
</fileset>
</phpdoc2>
<echo msg="Generating PhpDoc."/>
</target>
<!-- Run unit tests -->
<target name="unit-test" depends="prepare" description="Run unit tests">
<exec command="./bin/phpspec --ansi" output="reports/specs.log"/>
<echo msg="run phpspec"/>
</target>
<!-- Run integration test (WARNING: require db reset) -->
<target name="integration-test" depends="unit-test" description="Run integration tests">
<phpunit codecoverage="true" configuration="app/phpunit.xml">
<formatter todir="reports" type="xml" outfile="integration.xml"/>
</phpunit>
</target>
<target name="clean">
<delete dir="reports"/>
<delete dir="docs"/>
<delete dir="build"/>
</target>
</project>