blob: fdb6fcf3625de7718d552a0d2541e66ec80a00e8 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<project name="predictionio" default="install-dependencies">
<target name="install-dependencies">
<if>
<available file="composer.phar" />
<then>
<echo>Composer is installed</echo>
</then>
<else>
<echo message="Installing composer" />
<exec command="php -r &quot;copy('https://getcomposer.org/installer', 'composer-setup.php');&quot;" passthru="true" />
<exec command="php -r &quot;if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;&quot;" passthru="true" />
<exec command="php composer-setup.php" passthru="true" />
<exec command="php -r &quot;unlink('composer-setup.php');&quot;" 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="apigen">
<exec command="vendor/apigen/apigen/bin/apigen generate -s src -d docs --title 'PredictionIO API PHP Client'" passthru="true" />
</target>
<target name="test">
<exec command="vendor/phpunit/phpunit/phpunit" passthru="true" />
</target>
</project>