mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-27 01:38:57 +02:00
Add new Run Command method which gusses on the deployment stage to run it local or remote.
This commit is contained in:
@@ -48,6 +48,15 @@ abstract class Mage_Task_TaskAbstract
|
||||
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)
|
||||
{
|
||||
return Mage_Console::executeCommand($command, $output);
|
||||
|
||||
Reference in New Issue
Block a user