mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-16 12:35:04 +02:00
Add new Run Command method which gusses on the deployment stage to run it local or remote.
This commit is contained in:
parent
a29eb1e207
commit
f6df60a406
|
@ -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…
Reference in a new issue