diff --git a/src/Task/BuiltIn/Deploy/RsyncTask.php b/src/Task/BuiltIn/Deploy/RsyncTask.php index 57e1d0d..1dce74e 100644 --- a/src/Task/BuiltIn/Deploy/RsyncTask.php +++ b/src/Task/BuiltIn/Deploy/RsyncTask.php @@ -54,7 +54,7 @@ class RsyncTask extends AbstractTask protected function getExcludes() { - $excludes = $this->runtime->getMergedOption('exclude', []); + $excludes = $this->runtime->getEnvOption('exclude', []); $excludes = array_merge(['.git'], array_filter($excludes)); foreach ($excludes as &$exclude) { diff --git a/src/Task/BuiltIn/Deploy/Tar/PrepareTask.php b/src/Task/BuiltIn/Deploy/Tar/PrepareTask.php index d982000..e694f8f 100644 --- a/src/Task/BuiltIn/Deploy/Tar/PrepareTask.php +++ b/src/Task/BuiltIn/Deploy/Tar/PrepareTask.php @@ -51,7 +51,7 @@ class PrepareTask extends AbstractTask protected function getExcludes() { - $excludes = $this->runtime->getMergedOption('exclude', []); + $excludes = $this->runtime->getEnvOption('exclude', []); $excludes = array_merge(['.git'], array_filter($excludes)); foreach ($excludes as &$exclude) { diff --git a/tests/Command/BuiltIn/DeployCommandMiscTasksTest.php b/tests/Command/BuiltIn/DeployCommandMiscTasksTest.php index d0a9d39..ae13f8b 100644 --- a/tests/Command/BuiltIn/DeployCommandMiscTasksTest.php +++ b/tests/Command/BuiltIn/DeployCommandMiscTasksTest.php @@ -50,27 +50,9 @@ class DeployCommandMiscTasksTest extends TestCase $this->assertEquals(0, $tester->getStatusCode()); } - public function composerFlagsDataProvider() { - return [ - 'default' => [ - 'yml' => __DIR__ . '/../../Resources/composer.yml' - ], - 'global exclude' => [ - 'yml' => __DIR__ . '/../../Resources/global-exclude.yml' - ], - ]; - } - - /** - * testComposerFlags - * - * @dataProvider composerFlagsDataProvider - * @param string $yml - * @return void - */ - public function testComposerFlags($yml) + public function testComposerFlags() { - $application = new MageApplicationMockup($yml); + $application = new MageApplicationMockup(__DIR__ . '/../../Resources/composer.yml'); /** @var AbstractCommand $command */ $command = $application->find('deploy'); diff --git a/tests/Resources/global-exclude.yml b/tests/Resources/global-exclude.yml deleted file mode 100644 index cfa5ddf..0000000 --- a/tests/Resources/global-exclude.yml +++ /dev/null @@ -1,17 +0,0 @@ -magephp: - log_dir: /tmp - composer: - path: /usr/bin/composer.phar - exclude: - - ./var/cache/* - - ./var/log/* - - ./web/app_dev.php - environments: - test: - user: tester - host_path: /var/www/test - hosts: - - testhost - pre-deploy: - - composer/install: { flags: '--prefer-source' } - - composer/dump-autoload: { flags: '--no-scripts' }