1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 18:13:00 +01:00
guzzle/build/packager.php

28 lines
1.0 KiB
PHP
Raw Normal View History

<?php
2015-05-25 16:13:30 -07:00
require __DIR__ . '/Burgomaster.php';
2014-08-19 22:02:13 -07:00
$stageDirectory = __DIR__ . '/artifacts/staging';
$projectRoot = __DIR__ . '/../';
$packager = new \Burgomaster($stageDirectory, $projectRoot);
2014-08-19 22:02:13 -07:00
// 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) {
2014-08-17 22:38:05 -07:00
$packager->deepCopy($file, $file);
}
2014-08-19 22:02:13 -07:00
// Copy each dependency to the staging directory. Copy *.php and *.pem files.
2014-10-12 18:39:23 -07:00
$packager->recursiveCopy('src', 'GuzzleHttp', ['php']);
2015-03-28 13:56:28 -07:00
$packager->recursiveCopy('vendor/guzzlehttp/promises/src', 'GuzzleHttp/Promise');
2015-03-21 19:32:12 -07:00
$packager->recursiveCopy('vendor/guzzlehttp/psr7/src', 'GuzzleHttp/Psr7');
2015-03-28 13:56:28 -07:00
$packager->recursiveCopy('vendor/psr/http-message/src', 'Psr/Http/Message');
2015-03-21 19:32:12 -07:00
$packager->createAutoloader([
2015-03-28 13:56:28 -07:00
'GuzzleHttp/functions.php',
2015-03-21 19:32:12 -07:00
'GuzzleHttp/Psr7/functions.php',
'GuzzleHttp/Promise/functions.php',
]);
$packager->createPhar(__DIR__ . '/artifacts/guzzle.phar');
$packager->createZip(__DIR__ . '/artifacts/guzzle.zip');