mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	Reloads config after SCM Update.
This commit is contained in:
		
							parent
							
								
									04b194d91a
								
							
						
					
					
						commit
						59cdb24087
					
				@ -8,6 +8,13 @@ class Mage_Config
 | 
			
		||||
    private $_host = null;
 | 
			
		||||
    private $_releaseId = null;
 | 
			
		||||
 | 
			
		||||
    public function reloadConfig()
 | 
			
		||||
    {
 | 
			
		||||
        $this->loadGeneral();
 | 
			
		||||
        $this->loadSCM();
 | 
			
		||||
        $this->loadEnvironment($this->getEnvironmentName());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function loadEnvironment($environment)
 | 
			
		||||
    {
 | 
			
		||||
        if (($environment != '') && file_exists('.mage/config/environment/' . $environment . '.yml')) {
 | 
			
		||||
 | 
			
		||||
@ -3,12 +3,12 @@ class Mage_Task_BuiltIn_Scm_Update
 | 
			
		||||
    extends Mage_Task_TaskAbstract
 | 
			
		||||
{
 | 
			
		||||
    private $_name = 'SCM Update [built-in]';
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    public function getName()
 | 
			
		||||
    {
 | 
			
		||||
        return $this->_name;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    public function init()
 | 
			
		||||
    {
 | 
			
		||||
        switch ($this->_config->scm('type')) {
 | 
			
		||||
@ -21,7 +21,7 @@ class Mage_Task_BuiltIn_Scm_Update
 | 
			
		||||
                break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    public function run()
 | 
			
		||||
    {
 | 
			
		||||
        switch ($this->_config->scm('type')) {
 | 
			
		||||
@ -35,7 +35,8 @@ class Mage_Task_BuiltIn_Scm_Update
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        $result = $this->_runLocalCommand($command);
 | 
			
		||||
        
 | 
			
		||||
        $this->_config->reloadConfig();
 | 
			
		||||
 | 
			
		||||
        return $result;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user