2014-07-01 09:35:30 -07:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
2014-07-07 07:21:17 -07:00
|
|
|
<!--
|
|
|
|
/**
|
|
|
|
* The MIT License (MIT)
|
|
|
|
*
|
|
|
|
* Copyright (c) 2011-2014 BitPay LLC
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
-->
|
2014-07-02 11:08:42 -07:00
|
|
|
<project name="bitpay/magento-plugin" default="build">
|
2014-07-03 08:26:15 -07:00
|
|
|
<!--
|
2014-07-03 09:57:54 -07:00
|
|
|
Default properties
|
2014-07-03 08:26:15 -07:00
|
|
|
-->
|
|
|
|
<property file="build.properties" />
|
|
|
|
|
2014-07-03 06:27:45 -07:00
|
|
|
<!--
|
|
|
|
Default build for running a build locally
|
|
|
|
-->
|
|
|
|
<target name="build" depends="lint,phpunit">
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!--
|
|
|
|
Used to run a build on Travis CI
|
|
|
|
-->
|
2014-07-03 09:57:54 -07:00
|
|
|
<target name="build-travis" depends="prepare">
|
|
|
|
<parallel threadCount="3">
|
|
|
|
<phingcall target="lint" />
|
|
|
|
<phingcall target="database:create" />
|
|
|
|
<phingcall target="magento:install" />
|
|
|
|
</parallel>
|
|
|
|
<phingcall target="phpunit" />
|
2014-07-11 10:59:03 -07:00
|
|
|
<phingcall target="ocular:code-coverage:upload" />
|
2014-07-03 06:27:45 -07:00
|
|
|
</target>
|
2014-07-03 06:14:31 -07:00
|
|
|
|
2014-07-02 10:58:31 -07:00
|
|
|
<target name="clean" hidden="true">
|
|
|
|
<delete dir="build/logs" verbose="true" />
|
2014-07-03 09:38:45 -07:00
|
|
|
<delete file="build/magento/app/etc/local.xml" verbose="true" />
|
2014-07-02 10:58:31 -07:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="prepare" depends="clean" hidden="true">
|
|
|
|
<mkdir dir="build/logs" />
|
|
|
|
</target>
|
|
|
|
|
2014-07-03 09:57:54 -07:00
|
|
|
<target name="lint">
|
2014-07-01 09:35:30 -07:00
|
|
|
<phplint>
|
|
|
|
<fileset dir="app/code/community/Bitpay/Bitcoins">
|
|
|
|
<include name="**/*.php"/>
|
|
|
|
</fileset>
|
|
|
|
<fileset dir="lib/bitpay">
|
|
|
|
<include name="**/*.php"/>
|
|
|
|
</fileset>
|
|
|
|
</phplint>
|
|
|
|
</target>
|
2014-07-02 11:08:42 -07:00
|
|
|
|
|
|
|
<target name="phpunit">
|
2014-07-02 14:11:08 -07:00
|
|
|
<exec executable="bin/phpunit" passthru="true" />
|
2014-07-02 11:08:42 -07:00
|
|
|
</target>
|
2014-07-03 06:14:31 -07:00
|
|
|
|
2014-07-07 08:49:43 -07:00
|
|
|
<target name="scrutinizer:ocular:download">
|
|
|
|
<if>
|
|
|
|
<not>
|
|
|
|
<available file="ocular.phar" />
|
|
|
|
</not>
|
|
|
|
<then>
|
|
|
|
<exec executable="wget" passthru="true">
|
|
|
|
<arg value="https://scrutinizer-ci.com/ocular.phar" />
|
|
|
|
</exec>
|
|
|
|
</then>
|
|
|
|
</if>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="ocular:code-coverage:upload" depends="scrutinizer:ocular:download">
|
|
|
|
<exec executable="ocular.phar">
|
|
|
|
<arg value="code-coverage:upload" />
|
|
|
|
<arg value="--format=php-clover" />
|
|
|
|
<arg value="build/logs/clover.xml" />
|
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
2014-07-03 08:26:15 -07:00
|
|
|
<target name="database:create">
|
|
|
|
<exec executable="mysql" passthru="true">
|
2014-07-03 10:08:24 -07:00
|
|
|
<arg value="--user=${DB_USER}" />
|
|
|
|
<arg value="--password=${DB_PASS}" />
|
2014-07-03 08:26:15 -07:00
|
|
|
<arg value="-e" />
|
2014-07-03 10:08:24 -07:00
|
|
|
<arg value="create database ${DB_NAME};" />
|
2014-07-03 09:38:45 -07:00
|
|
|
</exec>
|
|
|
|
</target>
|
|
|
|
|
2014-07-03 09:57:54 -07:00
|
|
|
<target name="magento:install">
|
2014-07-07 08:49:43 -07:00
|
|
|
<exec executable="bin/n98-magerun" passthru="true">
|
2014-07-03 09:38:45 -07:00
|
|
|
<arg value="install" />
|
|
|
|
<arg value="-n" />
|
|
|
|
<arg value="--forceUseDb=${DB_NAME}" />
|
|
|
|
<arg value="--magentoVersion=${MAGENTO_VERSION}" />
|
|
|
|
<arg value="--installationFolder=build/magento" />
|
|
|
|
<arg value="--dbHost=${DB_HOST}" />
|
|
|
|
<arg value="--dbUser=${DB_USER}" />
|
|
|
|
<arg value="--dbPass=${DB_PASS}" />
|
|
|
|
<arg value="--dbName=${DB_NAME}" />
|
|
|
|
<arg value="--installSampleData=no" />
|
|
|
|
<arg value="--useDefaultConfigParams=yes" />
|
|
|
|
<arg value="--baseUrl=http://www.localhost.com" />
|
2014-07-03 08:26:15 -07:00
|
|
|
</exec>
|
|
|
|
</target>
|
2014-07-01 09:35:30 -07:00
|
|
|
</project>
|