mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-05-17 21:26:40 +02:00
git local commands should be executed in the deployment:from directory bis
This commit is contained in:
parent
dd79eca75f
commit
81a8ccdeb8
|
@ -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 a new issue