mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	Revert "[FEATURE] allow exclude definition global"
This commit is contained in:
		
							parent
							
								
									c649814158
								
							
						
					
					
						commit
						591ac04229
					
				@ -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) {
 | 
			
		||||
 | 
			
		||||
@ -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) {
 | 
			
		||||
 | 
			
		||||
@ -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');
 | 
			
		||||
 | 
			
		||||
@ -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' }
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user