<?xml version="1.0" encoding="UTF-8"?>
<project name="Controller" default="build" basedir=".">
  <property name="php_bin_path" value="/usr/local/bin"/>

  <target name="build">
    <phingcall target="prepare"/>
    <phingcall target="composer"/>
    <phingcall target="transfer"/>
  </target>

  <target name="prepare">
    <delete dir="dist"/>
    <mkdir dir="dist"/>
  </target>

  <target name="composer">
    <exec passthru="true" checkreturn="false" command="php ${php_bin_path}/composer.phar update --no-dev --optimize-autoloader --prefer-dist --no-interaction"/>
  </target>

  <target name="transfer">
    <copy todir="dist">
        <fileset dir="vendor">
            <include name="autoload.php"></include>
            <include name="composer/**.php"></include>
            <include name="hassankhan/**/**.php"></include>
            <include name="symfony/yaml/**.php"></include>
            <include name="brain/**/**.php"></include>
        </fileset>
    </copy>
  </target>

</project>
