diff --git a/.gitignore b/.gitignore index 75a39e1..fcc18f5 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ robo.yml vendor .idea tests/logs +tools +*.phar diff --git a/.travis.yml b/.travis.yml index d95efb8..f908831 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,22 +1,31 @@ sudo: false language: php - php: - - 7.1 - - 7.2 - - 7.3 - +- 7.1 +- 7.2 +- 7.3 before_install: - - composer self-update - - composer validate --no-check-all --ansi - +- composer self-update +- composer validate --no-check-all --ansi install: - - travis_retry composer install --no-interaction --prefer-source - +- travis_retry composer install --no-interaction --prefer-source script: - - cd ${TRAVIS_BUILD_DIR} - - composer test - -after_script: - - cd ${TRAVIS_BUILD_DIR} - - composer coveralls +- cd ${TRAVIS_BUILD_DIR} +- composer test +after_success: +- cd ${TRAVIS_BUILD_DIR} +- composer coveralls +before_deploy: + - composer phar:install-tools + - rm -rf vendor/* + - composer install --prefer-dist --no-dev --no-interaction + - composer phar:build +deploy: + provider: releases + api_key: + secure: TC2XhUtEj4pjaAEmVKWLUCvQqN+rrm5N1MnS1bVORO7IxcOUCyDkqWnx/N4yfOniTrT0swkO/aBECqjCW52dfn1fkPw9xntpVm20VjG6XUE+L1jctVeEq2KGFYnrQPzUjRVANMYZuLOS5enqhDgLSzuNOhdTIJN2Zt3IERhqcBY39V7+gyZUPN6Zk7NglYH2mLC+0b7qKTRnoZfWAahlFBvayvQzPt8DVlj1J58b+9QFmEBcHjycTIUAHqMRrgYhdz2K4pZ8nWTZN8mcZt8wssNHekYPXPXQSPjoLpbs4ZOeWRpht4bfyvKJAbrG1xV7va1C1WYqWPLbuHUBOt9sc8UtqVY3+W0Zcy4uYXCTei1V21zvb9PO0Z1pGXJRLem/hkohuTvNO+OpKg8rAzglC0uG6FdrwexDM9TsF7hvsAcMYT2zVIzB/WjC4tsIKiJkBS7ljM/FMWAN0PIUvwfyML8ecp8T7KQIKnUIX9dZ4Hrayh4ULPr5M6E57IFJxhAY6/SmHrS1oj7ZhBovp7YpUCbeqrjG0e3qbUe02cc6tyAma5keWyiX7rMcKJxyQOwJVIK9dNiUDh9cxqPXSFzDNSe2oetA0nBc5VYeT4JG2pcH6zGSU+jaDGImQL52TY8ctKXvxZWYbstJ9o/Jur59gOW5r+/KtY+06fwr/Dmlo7w= + file: acquiacli.phar + skip_cleanup: true + on: + tags: true + repo: typhonius/acquia_cli diff --git a/composer.json b/composer.json index eedffa9..d897e7c 100644 --- a/composer.json +++ b/composer.json @@ -34,6 +34,12 @@ "phpstan/phpstan-phpunit": "^0.11.2" }, "scripts": { + "phar:install-tools": [ + "mkdir -p tools", + "curl -L https://github.com/humbug/box/releases/download/3.8.4/box.phar -o tools/box", + "chmod +x tools/box" + ], + "phar:build": "env PATH=tools:$PATH box compile", "lint": [ "find src -name '*.php' -print0 | xargs -0 -n1 php -l", "find tests -name '*.php' -print0 | xargs -0 -n1 php -l" diff --git a/src/Cli/AcquiaCli.php b/src/Cli/AcquiaCli.php index aa1abe7..c235bd2 100644 --- a/src/Cli/AcquiaCli.php +++ b/src/Cli/AcquiaCli.php @@ -115,6 +115,7 @@ public function __construct( $this->runner = new RoboRunner(); $this->runner->setContainer($container); $this->runner->registerCommandClasses($application, $commandClasses); + $this->runner->setSelfUpdateRepository('typhonius/acquia_cli'); } public function getContainer($input, $output, $application, $config, $client) diff --git a/tests/AcquiaCliApplicationTest.php b/tests/AcquiaCliApplicationTest.php index 35dcd72..286d717 100644 --- a/tests/AcquiaCliApplicationTest.php +++ b/tests/AcquiaCliApplicationTest.php @@ -47,7 +47,7 @@ public function testVersion() $actualValue = $this->execute($command); - $this->assertSame('AcquiaCli 2.0.0-dev' . PHP_EOL, $actualValue); + $this->assertContains('AcquiaCli 2', $actualValue); } public function testClientOptions()