Navigation Menu

Skip to content

Commit

Permalink
Merge pull request aws#336 from aws/replace_phing
Browse files Browse the repository at this point in the history
Replacing phing with Burgomaster
  • Loading branch information
mtdowling committed Aug 18, 2014
2 parents 00c4d18 + 39e2b9a commit 03a61d4
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 152 deletions.
32 changes: 32 additions & 0 deletions Makefile
@@ -0,0 +1,32 @@
all: clean coverage docs

test:
vendor/bin/phpunit

coverage:
vendor/bin/phpunit --coverage-html=build/artifacts/coverage

integration:
vendor/bin/phpunit -c phpunit.functional.xml

view-coverage:
open build/artifacts/coverage/index.html

clean:
rm -rf build/artifacts
cd docs && make clean

docs:
cd docs && make html

view-docs:
open docs/_build/html/index.html

package: burgomaster
time php build/packager.php

burgomaster:
mkdir -p build/artifacts
curl -s https://raw.githubusercontent.com/mtdowling/Burgomaster/0.0.1/src/Burgomaster.php > build/artifacts/Burgomaster.php

.PHONY: docs burgomaster
109 changes: 0 additions & 109 deletions build.xml

This file was deleted.

35 changes: 0 additions & 35 deletions build/aws-autoloader.php

This file was deleted.

26 changes: 26 additions & 0 deletions build/packager.php
@@ -0,0 +1,26 @@
<?php
require __DIR__ . '/artifacts/Burgomaster.php';

$stageDirectory = __DIR__ . '/artifacts/staging';
$projectRoot = __DIR__ . '/../';
$burgomaster = new \Burgomaster($stageDirectory, $projectRoot);

foreach (['README.md', 'LICENSE.md', 'NOTICE.md'] as $file) {
$burgomaster->deepCopy($file, $file);
}

// Copy each dependency to the staging directory. Copy *.php and *.pem files.
$burgomaster->recursiveCopy('src/Aws', 'Aws', ['php', 'json']);
$burgomaster->recursiveCopy('vendor/guzzle/guzzle/src/Guzzle', 'Guzzle', ['php', 'pem']);
$burgomaster->recursiveCopy('vendor/doctrine/cache/lib/Doctrine', 'Doctrine');
$burgomaster->recursiveCopy('vendor/psr/log/Psr', 'Psr');
$burgomaster->recursiveCopy('vendor/monolog/monolog/src/Monolog', 'Monlog');
$burgomaster->recursiveCopy('vendor/symfony/event-dispatcher/Symfony', 'Symfony');

$burgomaster->createAutoloader();
$burgomaster->createZip(__DIR__ . '/artifacts/aws.zip');
$burgomaster->createPhar(__DIR__ . '/artifacts/aws.phar');
$burgomaster->startSection('test_phar');
$burgomaster->debug('Phar output: '
. $burgomaster->exec('php ' . __DIR__ . '/test_phar.php'));
$burgomaster->endSection();
6 changes: 0 additions & 6 deletions build/phar-stub.php

This file was deleted.

8 changes: 7 additions & 1 deletion build/test_phar.php
@@ -1,4 +1,10 @@
<?php
require __DIR__ . '/artifacts/aws.phar';
Aws\S3\S3Client::factory()->listBuckets();

$client = Aws\S3\S3Client::factory([
'key' => 'foo',
'secret' => 'bar',
'region' => 'us-east-1'
]);

echo 'Version=' . Aws\Common\Aws::VERSION;
1 change: 0 additions & 1 deletion composer.json
Expand Up @@ -31,7 +31,6 @@
"ext-openssl": "*",
"monolog/monolog": "1.4.*",
"phpunit/phpunit": "4.*",
"symfony/class-loader": "2.*",
"symfony/yaml": "2.*"
},
"autoload": {
Expand Down

0 comments on commit 03a61d4

Please sign in to comment.