forked from apache/predictionio-sdk-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
57 lines (48 loc) · 1.79 KB
/
build.xml
File metadata and controls
57 lines (48 loc) · 1.79 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="predictionio" default="package">
<property name="dir.output" value="${project.basedir}/build/artifacts" />
<target name="clean">
<delete dir="${dir.output}" />
</target>
<target name="prepare" depends="clean">
<mkdir dir="${dir.output}" />
</target>
<target name="install-dependencies" depends="prepare">
<if>
<available file="composer.phar" />
<then>
<echo>Composer is installed</echo>
</then>
<else>
<echo message="Installing composer" />
<exec command="curl -s http://getcomposer.org/installer | php" passthru="true" />
<exec command="php composer.phar install --dev" passthru="true" />
</else>
</if>
</target>
<target name="clean-dependencies">
<delete dir="${project.basedir}/vendor"/>
<delete file="composer.lock" />
</target>
<target name="update-dependencies">
<exec command="php composer.phar update --dev" passthru="true" />
</target>
<target name="package" depends="install-dependencies" description="Create a PHAR with an autoloader">
<pharpackage
destfile="${dir.output}/predictionio.phar"
basedir="."
stub="phar-stub.php">
<fileset dir=".">
<include name="src/**/*.php" />
<include name="src/**/*.json" />
<include name="vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php" />
<include name="vendor/symfony/event-dispatcher/**/*.php" />
<include name="vendor/guzzle/guzzle/src/Guzzle/**/*.php" />
</fileset>
<metadata>
<element name="author" value="PredictionIO" />
</metadata>
</pharpackage>
<exec command="apigen -s src -d docs --title 'PredictionIO API PHP Client'" passthru="true" />
</target>
</project>