-
Notifications
You must be signed in to change notification settings - Fork 137
/
build.xml
63 lines (58 loc) · 1.83 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Neo4jPHP" default="test">
<taskdef name="neo4jphpversion" classname="Neo4jPhpVersionTask" />
<!-- Target: test -->
<target name="test" description="Verify all unit tests pass; fail if not">
<exec executable="vendor/bin/phpunit" passthru="true" checkreturn="true">
<arg line="-c tests/phpunit.xml" />
</exec>
</target>
<!-- Target: cs -->
<target name="cs" description="Verify that coding style guidelines are met; fail if not">
<exec executable="vendor/bin/phpcs" passthru="true" checkreturn="true">
<arg line="--standard=./tests/cs/ruleset.xml" />
<arg line="-s" />
<arg line="lib" />
</exec>
</target>
<!-- Target: ci -->
<target name="ci" description="Run all targets that verify CI build is good">
<phingcall target="test" />
<phingcall target="cs" />
</target>
<!-- Target: build -->
<target name="build" description="Copy all package release files to a build directory">
<delete dir="./build" />
<mkdir dir="./build" />
<copy todir="./build">
<fileset dir=".">
<include name="README.md" />
<include name="LICENSE" />
<include name="lib/" />
</fileset>
</copy>
</target>
<!-- Target: package -->
<target name="package" description="Package the release files into an executable PHAR" depends="build">
<neo4jphpversion property="version" />
<delete file="./neo4jphp.phar" />
<pharpackage
destfile="./neo4jphp.phar"
basedir="./build"
compression="none"
stub="./stub.php"
signature="sha1">
<fileset dir="./build">
<include name="**/**" />
</fileset>
<metadata>
<element name="version" value="${version}" />
<element name="authors">
<element name="Josh Adell">
<element name="email" value="[email protected]" />
</element>
</element>
</metadata>
</pharpackage>
</target>
</project>