mirror of
https://github.com/hauke68/Magallanes.git
synced 2025-09-13 12:40:18 +02:00
Merge pull request #285 from MikeTralala/patch-1
Change the point the current branch is saved.
This commit is contained in:
commit
8ab3a25a72
@ -74,6 +74,8 @@ class ChangeBranchTask extends AbstractTask
|
|||||||
$currentBranch = 'master';
|
$currentBranch = 'master';
|
||||||
$result = $this->runCommandLocal($command, $currentBranch);
|
$result = $this->runCommandLocal($command, $currentBranch);
|
||||||
|
|
||||||
|
self::$startingBranch = $currentBranch;
|
||||||
|
|
||||||
$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) {
|
||||||
@ -88,8 +90,6 @@ class ChangeBranchTask extends AbstractTask
|
|||||||
$branch = $this->getParameter('branch', $scmData['branch']);
|
$branch = $this->getParameter('branch', $scmData['branch']);
|
||||||
$command = $preCommand . 'git checkout ' . $branch;
|
$command = $preCommand . 'git checkout ' . $branch;
|
||||||
$result = $this->runCommandLocal($command) && $result;
|
$result = $this->runCommandLocal($command) && $result;
|
||||||
|
|
||||||
self::$startingBranch = $currentBranch;
|
|
||||||
} else {
|
} else {
|
||||||
throw new SkipException;
|
throw new SkipException;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user