cloudflare/Cloudflare-CPanel
Publicmirrored fromhttps://github.com/cloudflare/Cloudflare-CPanel
vendor/guzzlehttp/guzzle/build/packager.php
21lines · modecode
unknown
| 1 | <?php |
| 2 | require __DIR__ . '/artifacts/Burgomaster.php'; |
| 3 | |
| 4 | $stageDirectory = __DIR__ . '/artifacts/staging'; |
| 5 | $projectRoot = __DIR__ . '/../'; |
| 6 | $packager = new \Burgomaster($stageDirectory, $projectRoot); |
| 7 | |
| 8 | // Copy basic files to the stage directory. Note that we have chdir'd onto |
| 9 | // the $projectRoot directory, so use relative paths. |
| 10 | foreach (['README.md', 'LICENSE'] as $file) { |
| 11 | $packager->deepCopy($file, $file); |
| 12 | } |
| 13 | |
| 14 | // Copy each dependency to the staging directory. Copy *.php and *.pem files. |
| 15 | $packager->recursiveCopy('src', 'GuzzleHttp', ['php']); |
| 16 | $packager->recursiveCopy('vendor/react/promise/src', 'React/Promise'); |
| 17 | $packager->recursiveCopy('vendor/guzzlehttp/ringphp/src', 'GuzzleHttp/Ring'); |
| 18 | $packager->recursiveCopy('vendor/guzzlehttp/streams/src', 'GuzzleHttp/Stream'); |
| 19 | $packager->createAutoloader(['React/Promise/functions.php']); |
| 20 | $packager->createPhar(__DIR__ . '/artifacts/guzzle.phar'); |
| 21 | $packager->createZip(__DIR__ . '/artifacts/guzzle.zip'); |