mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	
		
			
	
	
		
			26 lines
		
	
	
		
			525 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
		
		
			
		
	
	
			26 lines
		
	
	
		
			525 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| 
								 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								class Mage_Task_BuiltIn_Scm_Update
							 | 
						||
| 
								 | 
							
								    extends Mage_Task_TaskAbstract
							 | 
						||
| 
								 | 
							
								{
							 | 
						||
| 
								 | 
							
								    public function getName()
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        return 'SCM Update (built-in)';
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								    
							 | 
						||
| 
								 | 
							
								    public function run($config)
							 | 
						||
| 
								 | 
							
								    {
							 | 
						||
| 
								 | 
							
								        switch ($config['scm']['type']) {
							 | 
						||
| 
								 | 
							
								            case 'git':
							 | 
						||
| 
								 | 
							
								                $command = 'git pull';
							 | 
						||
| 
								 | 
							
								                break;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            case 'svn':
							 | 
						||
| 
								 | 
							
								                $command = 'svn update';
							 | 
						||
| 
								 | 
							
								                break;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								        $result = $this->_runLocalCommand($command);
							 | 
						||
| 
								 | 
							
								        
							 | 
						||
| 
								 | 
							
								        return $result;
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |