<?php require __DIR__ . '/../vendor/autoload.php'; $packager = new \Burgomaster(__DIR__ . '/artifacts/staging', __DIR__ . '/../'); $packager->exec('rm -rf ' . __DIR__ . '/artifacts/xsolla.*'); $packager->recursiveCopy('src', 'Xsolla/SDK'); $packager->recursiveCopy('vendor/guzzle/guzzle/src/Guzzle', 'Guzzle', array('php', 'pem')); $packager->recursiveCopy('vendor/symfony/event-dispatcher', 'Symfony/Component/EventDispatcher'); $packager->recursiveCopy('vendor/symfony/http-foundation', 'Symfony/Component/HttpFoundation'); $packager->createAutoloader(array(), 'xsolla-autoloader.php'); $packager->createPhar(__DIR__ . '/artifacts/xsolla.phar', null, 'xsolla-autoloader.php'); $packager->createZip(__DIR__ . '/artifacts/xsolla.zip'); $packager->startSection('test-phar'); $packager->exec('php ' . __DIR__ . '/test-phar.php'); $packager->endSection(); $packager->exec('rm -rf ' . __DIR__ . '/artifacts/staging');
<?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); // Copy basic files to the stage directory. Note that we have chdir'd onto // the $projectRoot directory, so use relative paths. foreach (['README.md', 'LICENSE'] as $file) { $packager->deepCopy($file, $file); } // Copy each dependency to the staging directory. Copy *.php and *.pem files. $packager->recursiveCopy('src', 'GuzzleHttp5Legacy', ['php']); $packager->recursiveCopy('vendor/react/promise/src', 'React/Promise'); $packager->recursiveCopy('vendor/guzzlehttp/ringphp/src', 'GuzzleHttp5Legacy/Ring'); $packager->recursiveCopy('vendor/guzzlehttp/streams/src', 'GuzzleHttp5Legacy/Stream'); $packager->createAutoloader(['React/Promise/functions.php']); $packager->createPhar(__DIR__ . '/artifacts/guzzle.phar'); $packager->createZip(__DIR__ . '/artifacts/guzzle.zip');
<?php // directory paths $baseDirectory = realpath(__DIR__ . '/..'); $buildDirectory = $baseDirectory . '/build'; $artifactsDirectory = $buildDirectory . '/artifacts'; $stagingDirectory = $artifactsDirectory . '/staging'; // create all needed directories. if (!file_exists($artifactsDirectory)) { mkdir($artifactsDirectory); } // setup packager require $baseDirectory . '/vendor/mtdowling/burgomaster/src/Burgomaster.php'; $packager = new \Burgomaster($stagingDirectory, $baseDirectory); // include readme and license files foreach (['README.md', 'LICENSE'] as $file) { $packager->deepCopy($file, $file); } // include source $packager->recursiveCopy('src', 'GW2Treasures/GW2Api', ['php']); // include cacert.pem $packager->deepCopy('src/cacert.pem', 'GW2Treasures/GW2Api/cacert.pem'); // create the autoloader $packager->createAutoloader(); // build phar and zip archives $packager->createPhar($buildDirectory . '/artifacts/gw2api.phar'); $packager->createZip($buildDirectory . '/artifacts/gw2api.zip');
<?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();
<?php require __DIR__ . '/artifacts/Burgomaster.php'; $stageDirectory = __DIR__ . '/artifacts/staging'; $projectRoot = __DIR__ . '/../'; $packager = new \Burgomaster($stageDirectory, $projectRoot); $autoLoader = 'dts-business-policies-management-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-business-policies-management.zip'); $packager->createPhar(__DIR__ . '/artifacts/dts-business-policies-management.phar', null, $autoLoader); $packager->startSection('test_phar'); $packager->debug('Phar output: ' . $packager->exec('php ' . __DIR__ . '/test_phar.php')); $packager->endSection();
<?php require __DIR__ . '/artifacts/Burgomaster.php'; $stageDirectory = __DIR__ . '/artifacts/staging'; $projectRoot = __DIR__ . '/../'; $packager = new \Burgomaster($stageDirectory, $projectRoot); $autoLoader = 'ebay-sdk-php-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/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/ebay-sdk-php.zip'); $packager->createPhar(__DIR__ . '/artifacts/ebay-sdk-php.phar', null, $autoLoader); $packager->startSection('test_phar'); $packager->debug('Phar output: ' . $packager->exec('php ' . __DIR__ . '/test_phar.php')); $packager->endSection();
<?php require __DIR__ . '/../src/Burgomaster.php'; $buildDir = sys_get_temp_dir() . '/bbuild'; $stageDirectory = sys_get_temp_dir() . '/bstage'; $projectRoot = __DIR__ . '/../'; $packager = new \Burgomaster($stageDirectory, $projectRoot); foreach (array('README.rst', 'LICENSE') as $file) { $packager->deepCopy($file, $file); } $packager->recursiveCopy('src', 'src'); $packager->createAutoloader(array(), 'test-autoloader.php'); $packager->createPhar("{$buildDir}/bg.phar", null, 'test-autoloader.php'); $packager->createZip("{$buildDir}/bg.zip");
<?php require __DIR__ . '/artifacts/Burgomaster.php'; $stageDirectory = __DIR__ . '/artifacts/staging'; $projectRoot = __DIR__ . '/../'; $packager = new \Burgomaster($stageDirectory, $projectRoot); $autoLoader = 'dts-finding-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-finding.zip'); $packager->createPhar(__DIR__ . '/artifacts/dts-finding.phar', null, $autoLoader); $packager->startSection('test_phar'); $packager->debug('Phar output: ' . $packager->exec('php ' . __DIR__ . '/test_phar.php')); $packager->endSection();
<?php require __DIR__ . '/Burgomaster.php'; require __DIR__ . '/../vendor/autoload.php'; $stageDirectory = __DIR__ . '/artifacts/staging'; $projectRoot = __DIR__ . '/../'; $burgomaster = new \Burgomaster($stageDirectory, $projectRoot); $autoloaderFilename = 'blockcypher-autoloader.php'; $metaFiles = ['README.md', 'LICENSE.md']; foreach ($metaFiles as $file) { $burgomaster->deepCopy($file, $file); } $burgomaster->recursiveCopy('lib', 'BlockCypher', ['php', 'json']); $burgomaster->recursiveCopy('vendor/bitwasp/bitcoin/src', 'BitWasp/Bitcoin'); $burgomaster->createAutoloader(['BlockCypher/functions.php', 'BitWasp/Bitcoin/functions.php'], $autoloaderFilename); $burgomaster->createZip(__DIR__ . "/artifacts/blockcypher.zip"); $burgomaster->createPhar(__DIR__ . "/artifacts/blockcypher.phar", null, $autoloaderFilename); $burgomaster->startSection('test-phar'); $burgomaster->exec('php ' . __DIR__ . '/test-phar.php'); $burgomaster->endSection();