Browse Source

Change runCommandRemote() to runCommand()

Change runCommandRemote() to runCommand(), you decide if the command is
running local or remote depending of the stage you put the
scm/force-update task. Remove the last $result =
$this->runCommandLocal($command), not necessary.
1.0
samuel4x4 10 years ago
parent
commit
c010fc662e
  1. 7
      Mage/Task/BuiltIn/Scm/ForceUpdateTask.php

7
Mage/Task/BuiltIn/Scm/ForceUpdateTask.php

@ -65,13 +65,13 @@ class ForceUpdateTask extends AbstractTask
$remote = $this->getParameter('remote', 'origin'); $remote = $this->getParameter('remote', 'origin');
$command = 'git fetch ' . $remote . ' ' . $branch; $command = 'git fetch ' . $remote . ' ' . $branch;
$result = $this->runCommandRemote($command); $result = $this->runCommand($command);
$command = 'git reset --hard ' . $remote . '/' . $branch; $command = 'git reset --hard ' . $remote . '/' . $branch;
$result = $result && $this->runCommandRemote($command); $result = $result && $this->runCommand($command);
$command = 'git pull ' . $remote . ' ' . $branch; $command = 'git pull ' . $remote . ' ' . $branch;
$result = $result && $this->runCommandRemote($command); $result = $result && $this->runCommand($command);
break; break;
default: default:
@ -79,7 +79,6 @@ class ForceUpdateTask extends AbstractTask
break; break;
} }
$result = $this->runCommandLocal($command);
$this->getConfig()->reload(); $this->getConfig()->reload();
return $result; return $result;

Loading…
Cancel
Save