-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
executable file
·42 lines (37 loc) · 1.51 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
<?xml version="1.0"?>
<project name="chilimatic-build-example" default="build" basedir="."
description="This is a Phing build target collection so they are easier to compose.">
<property name="phingBuildTargetPath" value="./build-targets" />
<!-- import the different tasks -->
<import file="${phingBuildTargetPath}/git/update.xml"/>
<import file="${phingBuildTargetPath}/php/composer.xml"/>
<import file="${phingBuildTargetPath}/node/npm.xml"/>
<import file="${phingBuildTargetPath}/node/bower.xml"/>
<import file="${phingBuildTargetPath}/node/unittest.xml"/>
<!-- property list -->
<property value="" name="outputValue"/>
<!-- prepares the project -->
<target name="prepare" depends="php.composer.check, node.npm.check">
<!-- check if npm exists otherwise fail -->
<phingcall target="node.npm.install.routine"/>
<phingcall target="php.composer.install.routine"/>
</target>
<!-- unit tests triggered -->
<target name="test">
<phpunit haltonerror="true" haltonfailure="true">
<batchtest>
<fileset dir="test">
<include name="*Test.php"/>
</fileset>
</batchtest>
</phpunit>
</target>
<!-- build the package -->
<target name="build" depends="test,prepare">
<phingcall target="node.bower.install.routine"/>
</target>
<target name="clean">
<delete dir="vendor"/>
<delete dir="node_modules"/>
</target>
</project>