mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-12 11:30:49 +01:00
143 lines
5.6 KiB
XML
143 lines
5.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project name="guzzle" default="package">
|
|
|
|
<property name="dir.output" value="${project.basedir}/build/artifacts" />
|
|
|
|
<target name="tag">
|
|
<echo>Not yet implemented</echo>
|
|
</target>
|
|
|
|
<target name="test" description="Run unit tests" depends="test-init">
|
|
<exec passthru="true" command="phpunit" />
|
|
</target>
|
|
|
|
<target name="test-init" depends="install-dependencies" description="Initialize test dependencies">
|
|
<copy file="phpunit.xml.dist" tofile="phpunit.xml" overwrite="false" />
|
|
</target>
|
|
|
|
<target name="install-dependencies">
|
|
<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="clean">
|
|
<delete dir="${dir.output}"/>
|
|
</target>
|
|
|
|
<target name="prepare" depends="clean,test-init">
|
|
<mkdir dir="${dir.output}"/>
|
|
<mkdir dir="${dir.output}/logs" />
|
|
</target>
|
|
|
|
<target name="coverage" depends="prepare">
|
|
<exec passthru="true" command="phpunit --coverage-html=${dir.output}/coverage --coverage-clover=${dir.output}/logs/clover.xml" />
|
|
</target>
|
|
|
|
<target name="view-coverage">
|
|
<exec passthru="true" command="open ${dir.output}/coverage/index.html" />
|
|
</target>
|
|
|
|
<target name="package" depends="test-init" description="Create a phar with an autoloader">
|
|
<pharpackage
|
|
destfile="${dir.output}/guzzle.phar"
|
|
basedir="."
|
|
stub="phar-stub.php"
|
|
signature="md5">
|
|
<fileset dir=".">
|
|
<include name="src/**/*.php" />
|
|
<include name="vendor/symfony/class-loader/Symfony/Component/ClassLoader/UniversalClassLoader.php" />
|
|
<include name="vendor/symfony/event-dispatcher/**/*.php" />
|
|
<include name="vendor/doctrine/common/lib/Doctrine/Common/Cache/*.php" />
|
|
<include name="vendor/monolog/monolog/src/**/*.php" />
|
|
</fileset>
|
|
<metadata>
|
|
<element name="author" value="Michael Dowling" />
|
|
</metadata>
|
|
</pharpackage>
|
|
<exec command="php -d guzzle_phar=${dir.output}/guzzle.phar `which phpunit`" passthru="true" />
|
|
</target>
|
|
|
|
<target name="package-min" depends="test-init" description="Create a minimal phar">
|
|
<pharpackage
|
|
destfile="${dir.output}/guzzle-min.phar"
|
|
basedir="."
|
|
stub="phar-stub-min.php"
|
|
signature="md5">
|
|
<fileset dir=".">
|
|
<include name="src/**/*.php" />
|
|
</fileset>
|
|
<metadata>
|
|
<element name="author" value="Michael Dowling" />
|
|
</metadata>
|
|
</pharpackage>
|
|
<exec command="php -d guzzle_phar=${dir.output}/guzzle-min.phar `which phpunit`" passthru="true" />
|
|
</target>
|
|
|
|
<target name="build-pear">
|
|
|
|
<exec command="git describe --abbrev=0 --tags | tail -c6" outputProperty="version" />
|
|
<delete file="${project.basedir}/src/package.xml" />
|
|
<delete file="${dir.output}/guzzle-${version}.tgz" />
|
|
|
|
<pearpkg2 name="guzzle" dir="Guzzle">
|
|
<option name="outputdirectory" value="${project.basedir}/src"/>
|
|
<option name="packagefile" value="package.xml"/>
|
|
<option name="packagedirectory" value="${project.basedir}/src"/>
|
|
<option name="baseinstalldir" value="."/>
|
|
<option name="channel" value="guzzlephp.org/pear"/>
|
|
<option name="summary" value="Guzzle is a PHP 5.3+ HTTP client and framework for building RESTful web service clients"/>
|
|
<option name="description" value="PHP HTTP client"/>
|
|
<option name="apiversion" value="${version}"/>
|
|
<option name="apistability" value="stable"/>
|
|
<option name="releaseversion" value="${version}"/>
|
|
<option name="releasestability" value="stable"/>
|
|
<option name="license" value="MIT"/>
|
|
<option name="phpdep" value="5.3.2"/>
|
|
<option name="pearinstallerdep" value="1.4.6"/>
|
|
<option name="packagetype" value="php"/>
|
|
<option name="notes" value="-"/>
|
|
<mapping name="maintainers">
|
|
<element>
|
|
<element key="handle" value="mtdowling"/>
|
|
<element key="name" value="Michael Dowling"/>
|
|
<element key="email" value="mtdowling@gmail.com"/>
|
|
<element key="role" value="lead"/>
|
|
</element>
|
|
</mapping>
|
|
<option name="date" value="${date}" />
|
|
<fileset dir="${project.basedir}/src">
|
|
<include name="**/*.php" />
|
|
</fileset>
|
|
</pearpkg2>
|
|
|
|
<tar destfile="${dir.output}/guzzle-${version}.tgz" compression="gzip" basedir="${project.basedir}/src">
|
|
<fileset dir="${project.basedir}/src">
|
|
<include name="**/*.php" />
|
|
<include name="*.xml" />
|
|
</fileset>
|
|
</tar>
|
|
|
|
<delete file="${project.basedir}/src/package.xml" />
|
|
|
|
</target>
|
|
|
|
</project>
|