scratch – Blame information for rev 87
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
87 | office | 1 | <?php |
2 | require __DIR__ . '/artifacts/Burgomaster.php'; |
||
3 | |||
4 | // Creating staging directory at guzzlehttp/src/build/artifacts/staging. |
||
5 | $stageDirectory = __DIR__ . '/artifacts/staging'; |
||
6 | // The root of the project is up one directory from the current directory. |
||
7 | $projectRoot = __DIR__ . '/../'; |
||
8 | $packager = new \Burgomaster($stageDirectory, $projectRoot); |
||
9 | |||
10 | // Copy basic files to the stage directory. Note that we have chdir'd onto |
||
11 | // the $projectRoot directory, so use relative paths. |
||
12 | foreach (['README.md', 'LICENSE'] as $file) { |
||
13 | $packager->deepCopy($file, $file); |
||
14 | } |
||
15 | |||
16 | // Copy each dependency to the staging directory. Copy *.php and *.pem files. |
||
17 | $packager->recursiveCopy('src', 'GuzzleHttp', ['php', 'pem']); |
||
18 | $packager->recursiveCopy('vendor/guzzlehttp/streams/src', 'GuzzleHttp/Stream'); |
||
19 | // Create the classmap autoloader, and instruct the autoloader to |
||
20 | // automatically require the 'GuzzleHttp/functions.php' script. |
||
21 | $packager->createAutoloader(['GuzzleHttp/functions.php']); |
||
22 | // Create a phar file from the staging directory at a specific location |
||
23 | $packager->createPhar(__DIR__ . '/artifacts/guzzle.phar'); |
||
24 | // Create a zip file from the staging directory at a specific location |
||
25 | $packager->createZip(__DIR__ . '/artifacts/guzzle.zip'); |