From 8d2ac213be824a699a4c38acc78db66aa8e5220f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 15 May 2016 15:01:46 +0200 Subject: [PATCH 1/2] Add Box support (PHAR) --- .gitignore | 2 ++ .travis.yml | 15 +++++++++++++-- box.json | 26 ++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 box.json diff --git a/.gitignore b/.gitignore index 8f8675e0..3c2f5269 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ /composer.phar /composer.lock +/box.phar /vendor /build +/schema.phar diff --git a/.travis.yml b/.travis.yml index 828b91d0..69bdf99d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,15 +13,26 @@ matrix: - php: '5.5' - php: '5.6' - php: '7.0' - - php: hhvm + - php: 'hhvm' before_install: - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi; - - composer self-update + - curl -LSs https://box-project.github.io/box2/installer.php | php install: - composer update --no-interaction --prefer-dist + - php box.phar build script: - phpunit - tests/run-tests.sh + +deploy: + provider: releases + api_key: + secure: Oq9TAPQZqnjxhbprWZQE64GhK4vxBHjvcMkS9dkbkCJQVz8cSqGxZOFqMOHulraFs2IX9PLeplrZReFMT630KkMNf74mkTtL9WMuaMJV0bbUPY+X7YpDGlLNNU7OA9Rxjr3y68x1jVxD6mLSlCFZP00qvmYRlOE1i2ltjO7L5Sw= + file: schema.phar + skip_cleanup: true + on: + tags: true + repo: api-platform/schema-generator diff --git a/box.json b/box.json new file mode 100644 index 00000000..eaffa491 --- /dev/null +++ b/box.json @@ -0,0 +1,26 @@ +{ + "directories": ["src/"], + "finder": [ + { + "name": "*.php", + "exclude": [ + ".gitignore", + ".md", + "phpunit", + "Tester", + "Tests", + "tests" + ], + "in": "vendor" + } + ], + "compactors": [ + "Herrera\\Box\\Compactor\\Json", + "Herrera\\Box\\Compactor\\Php" + ], + "git-version": "package_version", + "main": "bin/schema", + "output": "schema.phar", + "stub": true, + "chmod": "0755" +} From 54440e1251fa16ca02af62504f254b365cee557a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 15 May 2016 15:11:50 +0200 Subject: [PATCH 2/2] Fix Travis --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 69bdf99d..6f6897ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,11 +17,11 @@ matrix: before_install: - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi; - - curl -LSs https://box-project.github.io/box2/installer.php | php + - if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then curl -LSs https://box-project.github.io/box2/installer.php | php; fi; install: - composer update --no-interaction --prefer-dist - - php box.phar build + - if [ "$TRAVIS_PHP_VERSION" = "5.6" ]; then php box.phar build; fi; script: - phpunit @@ -36,3 +36,4 @@ deploy: on: tags: true repo: api-platform/schema-generator + php: '5.6'