mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	Feature for declaring the Hosts for reading from a URI (file, url).
This commit is contained in:
		
							parent
							
								
									67d8eaaa00
								
							
						
					
					
						commit
						776b21ce08
					
				@ -49,7 +49,14 @@ class Mage_Config
 | 
			
		||||
        $hosts = array();
 | 
			
		||||
        
 | 
			
		||||
        if (isset($config['hosts'])) {
 | 
			
		||||
            if (is_array($config['hosts'])) {
 | 
			
		||||
                $hosts = (array) $config['hosts'];                
 | 
			
		||||
            } else if (is_string($config['hosts'])) {
 | 
			
		||||
                $fileContent = fopen($config['hosts'], 'r');
 | 
			
		||||
                while (($host = fgets($fileContent)) == true) {
 | 
			
		||||
                    $hosts[] = trim($host);
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        
 | 
			
		||||
        return $hosts;
 | 
			
		||||
 | 
			
		||||
@ -3,8 +3,7 @@ deployment:
 | 
			
		||||
  user: stg_user
 | 
			
		||||
  from: ./
 | 
			
		||||
  to: /var/www/vhosts/example.com/staging
 | 
			
		||||
hosts:
 | 
			
		||||
  - staging.example.com
 | 
			
		||||
hosts: /tmp/current-staging-hosts.txt
 | 
			
		||||
tasks:
 | 
			
		||||
  pre-deploy:
 | 
			
		||||
    - scm/update
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user