<?php require __DIR__ . '/artifacts/Burgomaster.php'; $stageDirectory = __DIR__ . '/artifacts/staging'; $projectRoot = __DIR__ . '/../'; $burgomaster = new \Burgomaster($stageDirectory, $projectRoot); $metaFiles = ['README.md', 'LICENSE.md', 'NOTICE.md', 'CHANGELOG.md']; foreach ($metaFiles 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();
<?php require __DIR__ . '/artifacts/Burgomaster.php'; $stageDirectory = __DIR__ . '/artifacts/staging'; $projectRoot = __DIR__ . '/../'; $packager = new \Burgomaster($stageDirectory, $projectRoot); $autoLoader = 'dts-shopping-autoloader.php'; $metaFiles = array('README.md', 'LICENSE.md', 'NOTICE.md', 'CHANGELOG.md'); foreach ($metaFiles as $file) { $packager->deepCopy($file, $file); } $packager->recursiveCopy('src/DTS', 'DTS'); $packager->recursiveCopy('vendor/dts/ebay-sdk/src/DTS', 'DTS'); $packager->recursiveCopy('vendor/guzzle/guzzle/src/Guzzle', 'Guzzle', ['php', 'pem']); $packager->recursiveCopy('vendor/psr/log/Psr', 'Psr', ['php']); $packager->recursiveCopy('vendor/symfony/event-dispatcher', 'Symfony/Component/EventDispatcher'); $packager->createAutoloader(array(), $autoLoader); $packager->createZip(__DIR__ . '/artifacts/dts-shopping.zip'); $packager->createPhar(__DIR__ . '/artifacts/dts-shopping.phar', null, $autoLoader); $packager->startSection('test_phar'); $packager->debug('Phar output: ' . $packager->exec('php ' . __DIR__ . '/test_phar.php')); $packager->endSection();