1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-01-18 05:48:15 +01:00
guzzle/build/build.xml
2011-11-10 17:38:40 -06:00

75 lines
2.8 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<project name="guzzle" default="init">
<target name="init-git" description="Initialize git submodules">
<echo msg="Initializing git submodules" />
<exec command="git submodule update --init" dir="./.." />
</target>
<target name="init-test" description="Initialize for unit testing">
<echo msg="Copying ./phpunit.xml.dist to ./phpunit.xml" />
<copy file="../phpunit.xml.dist" tofile="../phpunit.xml" />
</target>
<target name="init" depends="init-git,init-test" />
<target name="phar" description="Create a phar with an autoloader">
<pharpackage
destfile="./guzzle.phar"
basedir="../src"
stub="./autoload.php"
alias="Guzzle"
signature="sha1">
<fileset dir="../src">
<include name="**/*.php" />
<exclude name="**/Tests/**" />
</fileset>
<metadata>
<element name="version" value="1.0.1" />
</metadata>
</pharpackage>
</target>
<target name="phar-na" description="Create a phar with no autoloader">
<pharpackage
destfile="./guzzle-na.phar"
basedir="../src"
alias="Guzzle"
signature="sha1">
<fileset dir="../src">
<include name="**/*.php" />
<exclude name="**/Tests/**" />
</fileset>
<metadata>
<element name="version" value="1.0.1" />
</metadata>
</pharpackage>
</target>
<target name="template" description="Create a client project skeleton">
<input propertyname="service.path" promptChar=":">Enter the path where you want to install your web service client</input>
<input propertyname="service.short_name" promptChar=":">Enter the short name of your client (e.g. guzzle-aws)</input>
<input propertyname="service.client_class" promptChar=":">Enter the name of your client class (e.g. UnfuddleClient)</input>
<input propertyname="service.namespace" promptChar=":">Enter the root namespace of your client (e.g. Guzzle\Aws)</input>
<echo msg="Creating web service client project" />
<fileset id="skeleton" dir="./template">
<include name="**/**"/>
</fileset>
<echo msg="Creating folder for project at ${service.path}" />
<mkdir dir="${service.path}" />
<echo msg="Copying files to folder" />
<copy todir="${service.path}" overwrite="true">
<fileset refid="skeleton" />
<filterchain>
<expandproperties />
</filterchain>
</copy>
<move file="${service.path}/Client.php" toFile="${service.path}/${service.client_class}.php" />
</target>
</project>