mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-08 16:52:15 +02: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);
|
$scmData = $this->getConfig()->deployment('scm', false);
|
||||||
|
|
||||||
if ($result && is_array($scmData) && isset($scmData['branch']) && $scmData['branch'] != $currentBranch) {
|
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 = '';
|
$isBranchTracked = '';
|
||||||
$result = $this->runCommandLocal($command, $isBranchTracked);
|
$result = $this->runCommandLocal($command, $isBranchTracked);
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ class ChangeBranchTask extends AbstractTask
|
||||||
}
|
}
|
||||||
|
|
||||||
$branch = $this->getParameter('branch', $scmData['branch']);
|
$branch = $this->getParameter('branch', $scmData['branch']);
|
||||||
$command = 'git checkout ' . $branch;
|
$command = $preCommand . 'git checkout ' . $branch;
|
||||||
$result = $this->runCommandLocal($command) && $result;
|
$result = $this->runCommandLocal($command) && $result;
|
||||||
|
|
||||||
self::$startingBranch = $currentBranch;
|
self::$startingBranch = $currentBranch;
|
||||||
|
|
Loading…
Reference in a new issue