Exemple #1
0
<?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');
Exemple #2
0
<?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');
Exemple #4
0
<?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');
Exemple #5
0
<?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';
// Creating staging directory at guzzlehttp/src/build/artifacts/staging.
$stageDirectory = __DIR__ . '/artifacts/staging';
// The root of the project is up one directory from the current directory.
$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', 'GuzzleHttp', ['php', 'pem']);
$packager->recursiveCopy('vendor/guzzlehttp/streams/src', 'GuzzleHttp/Stream');
// Create the classmap autoloader, and instruct the autoloader to
// automatically require the 'GuzzleHttp/functions.php' script.
$packager->createAutoloader(['GuzzleHttp/functions.php']);
// Create a phar file from the staging directory at a specific location
$packager->createPhar(__DIR__ . '/artifacts/guzzle.phar');
// Create a zip file from the staging directory at a specific location
$packager->createZip(__DIR__ . '/artifacts/guzzle.zip');
<?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");
Exemple #8
0
<?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/GW2Tools', ['php']);
// create the autoloader
$packager->createAutoloader();
// build phar and zip archives
$packager->createPhar($buildDirectory . '/artifacts/gw2tools.phar');
$packager->createZip($buildDirectory . '/artifacts/gw2tools.zip');
Exemple #9
0
<?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();
<?php

require __DIR__ . '/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', 'GuzzleHttp', ['php']);
$packager->recursiveCopy('vendor/guzzlehttp/promises/src', 'GuzzleHttp/Promise');
$packager->recursiveCopy('vendor/guzzlehttp/psr7/src', 'GuzzleHttp/Psr7');
$packager->recursiveCopy('vendor/psr/http-message/src', 'Psr/Http/Message');
$packager->createAutoloader(['GuzzleHttp/functions.php', 'GuzzleHttp/Psr7/functions.php', 'GuzzleHttp/Promise/functions.php']);
$packager->createPhar(__DIR__ . '/artifacts/guzzle.phar');
$packager->createZip(__DIR__ . '/artifacts/guzzle.zip');