mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 09:00:18 +01:00 
			
		
		
		
	Merge pull request #260 from jhuet/patch-1
git local commands should be executed in the deployment:from directory
This commit is contained in:
		
						commit
						458ca0466d
					
				@ -77,7 +77,7 @@ class ChangeBranchTask extends AbstractTask
 | 
			
		||||
                    $scmData = $this->getConfig()->deployment('scm', false);
 | 
			
		||||
 | 
			
		||||
                    if ($result && is_array($scmData) && isset($scmData['branch']) && $scmData['branch'] != $currentBranch) {
 | 
			
		||||
                        $command = 'git branch | grep \'' . $scmData['branch'] . '\' | tr -s \' \' | sed \'s/^[ ]//g\'';
 | 
			
		||||
                        $command = $preCommand . 'git branch | grep \'' . $scmData['branch'] . '\' | tr -s \' \' | sed \'s/^[ ]//g\'';
 | 
			
		||||
                        $isBranchTracked = '';
 | 
			
		||||
                        $result = $this->runCommandLocal($command, $isBranchTracked);
 | 
			
		||||
 | 
			
		||||
@ -86,7 +86,7 @@ class ChangeBranchTask extends AbstractTask
 | 
			
		||||
                        }
 | 
			
		||||
 | 
			
		||||
                        $branch = $this->getParameter('branch', $scmData['branch']);
 | 
			
		||||
                        $command = 'git checkout ' . $branch;
 | 
			
		||||
                        $command = $preCommand . 'git checkout ' . $branch;
 | 
			
		||||
                        $result = $this->runCommandLocal($command) && $result;
 | 
			
		||||
 | 
			
		||||
                        self::$startingBranch = $currentBranch;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user