mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	Tweak on yaml parser. Added option for ssh port.
This commit is contained in:
		
							parent
							
								
									565078a7f8
								
							
						
					
					
						commit
						2ec4f58c77
					
				@ -116,7 +116,7 @@ class Mage_Config
 | 
				
			|||||||
        $config = $this->getEnvironment();
 | 
					        $config = $this->getEnvironment();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (isset($config[$type]) && isset($config[$type][$stage])) {
 | 
					        if (isset($config[$type]) && isset($config[$type][$stage])) {
 | 
				
			||||||
            $tasks = (array) $config[$type][$stage];
 | 
					            $tasks = ($config[$type][$stage] ? (array) $config[$type][$stage] : array());
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return $tasks;
 | 
					        return $tasks;
 | 
				
			||||||
 | 
				
			|||||||
@ -36,6 +36,7 @@ class Mage_Task_BuiltIn_Deployment_Rsync
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $command = 'rsync -avz '
 | 
					        $command = 'rsync -avz '
 | 
				
			||||||
 | 
					                 . '--rsh="ssh -p' . $this->_config->deployment('port', '22') . '" '
 | 
				
			||||||
                 . $this->_excludes(array_merge($excludes, $userExcludes)) . ' '
 | 
					                 . $this->_excludes(array_merge($excludes, $userExcludes)) . ' '
 | 
				
			||||||
                 . $this->_config->deployment('from') . ' '
 | 
					                 . $this->_config->deployment('from') . ' '
 | 
				
			||||||
                 . $this->_config->deployment('user') . '@' . $this->_config->getHost() . ':' . $deployToDirectory;
 | 
					                 . $this->_config->deployment('user') . '@' . $this->_config->getHost() . ':' . $deployToDirectory;
 | 
				
			||||||
 | 
				
			|||||||
@ -45,7 +45,8 @@ abstract class Mage_Task_TaskAbstract
 | 
				
			|||||||
            $releasesDirectory = '';
 | 
					            $releasesDirectory = '';
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        $localCommand = 'ssh -q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '
 | 
					        $localCommand = 'ssh -p ' . $this->_config->deployment('port', '22') . ' '
 | 
				
			||||||
 | 
					                      . '-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '
 | 
				
			||||||
                      . $this->_config->deployment('user') . '@' . $this->_config->getHost() . ' '
 | 
					                      . $this->_config->deployment('user') . '@' . $this->_config->getHost() . ' '
 | 
				
			||||||
                      . '"cd ' . rtrim($this->_config->deployment('to'), '/') . $releasesDirectory . ' && '
 | 
					                      . '"cd ' . rtrim($this->_config->deployment('to'), '/') . $releasesDirectory . ' && '
 | 
				
			||||||
                      . $command . '"';
 | 
					                      . $command . '"';
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user