Changes on console feedback colors. Example of User Tasks.

This commit is contained in:
Andrs Montaez
2011-11-23 09:38:52 -02:00
parent d6166a674d
commit e5f0fe9cfa
13 changed files with 174 additions and 93 deletions
+20 -4
View File
@@ -1,17 +1,33 @@
<?php
abstract class Mage_Task_TaskAbstract
{
protected $_config = null;
public abstract function getName();
public abstract function run($config);
public abstract function run();
protected function _runLocalCommand($command)
public final function __construct($config)
{
$this->_config = $config;
}
public function init()
{
}
protected final function _runLocalCommand($command)
{
return Mage_Console::executeCommand($command);
}
protected function _runRemoteCommand($command)
protected final function _runRemoteCommand($command)
{
$localCommand = 'ssh '
. $this->_config['deploy']['user'] . '@' . $this->_config['deploy']['host'] . ' '
. '"cd ' . $this->_config['deploy']['deploy-to'] . ' && '
. $command . '"';
return $this->_runLocalCommand($localCommand);
}
}