Browse Source

Add new Run Command method which gusses on the deployment stage to run it local or remote.

1.0
Andrés Montañez 11 years ago
parent
commit
f6df60a406
  1. 9
      Mage/Task/TaskAbstract.php

9
Mage/Task/TaskAbstract.php

@ -48,6 +48,15 @@ abstract class Mage_Task_TaskAbstract
return $this->getConfig()->getParameter($name, $default, $this->_parameters); return $this->getConfig()->getParameter($name, $default, $this->_parameters);
} }
protected final function runCommand($command, &$output = null)
{
if ($this->getStage() == 'deploy') {
return $this->_runRemoteCommand($command, $output);
} else {
return $this->_runLocalCommand($command, $output);
}
}
protected final function _runLocalCommand($command, &$output = null) protected final function _runLocalCommand($command, &$output = null)
{ {
return Mage_Console::executeCommand($command, $output); return Mage_Console::executeCommand($command, $output);

Loading…
Cancel
Save