mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 09:00:18 +01:00 
			
		
		
		
	Fixes #131
This commit is contained in:
		
							parent
							
								
									e4aafb3d3f
								
							
						
					
					
						commit
						8771cf2ab1
					
				@ -44,8 +44,17 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $result = true;
 | 
					        $result = true;
 | 
				
			||||||
        foreach ($hosts as $host) {
 | 
					        foreach ($hosts as $hostKey => $host) {
 | 
				
			||||||
 | 
					            // Check if Host has specific configuration
 | 
				
			||||||
 | 
					            $hostConfig = null;
 | 
				
			||||||
 | 
					            if (is_array($host)) {
 | 
				
			||||||
 | 
					                $hostConfig = $host;
 | 
				
			||||||
 | 
					                $host = $hostKey;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            // Set Host and Host Specific Config
 | 
				
			||||||
            $this->getConfig()->setHost($host);
 | 
					            $this->getConfig()->setHost($host);
 | 
				
			||||||
 | 
					            $this->getConfig()->setHostConfig($hostConfig);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            switch ($subCommand) {
 | 
					            switch ($subCommand) {
 | 
				
			||||||
                case 'list':
 | 
					                case 'list':
 | 
				
			||||||
 | 
				
			|||||||
@ -51,8 +51,17 @@ class RollbackCommand extends AbstractCommand implements RequiresEnvironment
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            $result = true;
 | 
					            $result = true;
 | 
				
			||||||
            foreach ($hosts as $host) {
 | 
					            foreach ($hosts as $hostKey => $host) {
 | 
				
			||||||
 | 
					                // Check if Host has specific configuration
 | 
				
			||||||
 | 
					                $hostConfig = null;
 | 
				
			||||||
 | 
					                if (is_array($host)) {
 | 
				
			||||||
 | 
					                    $hostConfig = $host;
 | 
				
			||||||
 | 
					                    $host = $hostKey;
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                // Set Host and Host Specific Config
 | 
				
			||||||
                $this->getConfig()->setHost($host);
 | 
					                $this->getConfig()->setHost($host);
 | 
				
			||||||
 | 
					                $this->getConfig()->setHostConfig($hostConfig);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                $this->getConfig()->setReleaseId($releaseId);
 | 
					                $this->getConfig()->setReleaseId($releaseId);
 | 
				
			||||||
                $task = Factory::get('releases/rollback', $this->getConfig());
 | 
					                $task = Factory::get('releases/rollback', $this->getConfig());
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user