Skip to content

Commit

Permalink
Merge pull request #700 from doctrine/box-phar-improvements
Browse files Browse the repository at this point in the history
Remove box.phar from git and improve box build process
  • Loading branch information
jwage authored May 29, 2018
2 parents ef1551d + 1b82f86 commit d71bbdd
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ vendor/
phpunit.xml
/phpcs.xml
/.phpcs-cache
/box.phar
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
install:
- rm composer.lock
- travis_retry composer update --prefer-dist --prefer-lowest
- ./download-box.sh

- stage: Test
env: COVERAGE
Expand Down
Binary file removed box.phar
Binary file not shown.
2 changes: 2 additions & 0 deletions build-phar.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash

./download-box.sh

php box.phar compile -vv
5 changes: 5 additions & 0 deletions download-box.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

if [ ! -f box.phar ]; then
wget https://github.com/humbug/box/releases/download/3.0.0-alpha.5/box.phar -O box.phar
fi
8 changes: 7 additions & 1 deletion tests/Doctrine/Migrations/Tests/BoxPharCompileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ class BoxPharCompileTest extends TestCase
{
public function testCompile() : void
{
$boxPharPath = realpath(__DIR__ . '/../../../../box.phar');
$boxPharPath = __DIR__ . '/../../../../box.phar';

if (! file_exists($boxPharPath)) {
$this->markTestSkipped('Download box with the ./download-box.sh shell script.');
}

$boxPharPath = realpath($boxPharPath);

$compilePharCommand = sprintf('php %s compile -vvv', $boxPharPath);

Expand Down

0 comments on commit d71bbdd

Please sign in to comment.