mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 09:00:18 +01:00 
			
		
		
		
	Change the point the current branch is saved.
This is necessary to save to reverse back to the right branch if another branch is used than 'master' and you´re currently working in the deployed branch.
This commit is contained in:
		
							parent
							
								
									dd79eca75f
								
							
						
					
					
						commit
						37d28e57cd
					
				@ -73,6 +73,8 @@ class ChangeBranchTask extends AbstractTask
 | 
			
		||||
                    $command = $preCommand . 'git branch | grep \'*\' | cut -d\' \' -f 2';
 | 
			
		||||
                    $currentBranch = 'master';
 | 
			
		||||
                    $result = $this->runCommandLocal($command, $currentBranch);
 | 
			
		||||
                    
 | 
			
		||||
                    self::$startingBranch = $currentBranch;
 | 
			
		||||
 | 
			
		||||
                    $scmData = $this->getConfig()->deployment('scm', false);
 | 
			
		||||
 | 
			
		||||
@ -88,8 +90,6 @@ class ChangeBranchTask extends AbstractTask
 | 
			
		||||
                        $branch = $this->getParameter('branch', $scmData['branch']);
 | 
			
		||||
                        $command = 'git checkout ' . $branch;
 | 
			
		||||
                        $result = $this->runCommandLocal($command) && $result;
 | 
			
		||||
 | 
			
		||||
                        self::$startingBranch = $currentBranch;
 | 
			
		||||
                    } else {
 | 
			
		||||
                        throw new SkipException;
 | 
			
		||||
                    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user