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
+4 -4
View File
@@ -4,10 +4,10 @@ class Mage_Task_BuiltIn_Deployment_Rsync
{
public function getName()
{
return 'Rsync (built-in)';
return 'Rsync [built-in]';
}
public function run($config)
public function run()
{
$ignores = array(
'--exclude .git',
@@ -18,8 +18,8 @@ class Mage_Task_BuiltIn_Deployment_Rsync
$command = 'rsync -avz '
. implode(' ', $ignores) .' '
. $config['deploy']['deploy-from'] . ' '
. $config['deploy']['user'] . '@' . $config['deploy']['host'] . ':' . $config['deploy']['deploy-to'];
. $this->_config['deploy']['deploy-from'] . ' '
. $this->_config['deploy']['user'] . '@' . $this->_config['deploy']['host'] . ':' . $this->_config['deploy']['deploy-to'];
$result = $this->_runLocalCommand($command);
+18 -3
View File
@@ -2,14 +2,29 @@
class Mage_Task_BuiltIn_Scm_Update
extends Mage_Task_TaskAbstract
{
private $_name = 'SCM Update [built-in]';
public function getName()
{
return 'SCM Update (built-in)';
return $this->_name;
}
public function run($config)
public function init()
{
switch ($config['scm']['type']) {
switch ($this->_config['scm']['type']) {
case 'git':
$this->_name = 'SCM Update (GIT) [built-in]';
break;
case 'svn':
$this->_name = 'SCM Update (Subversion) [built-in]';
break;
}
}
public function run()
{
switch ($this->_config['scm']['type']) {
case 'git':
$command = 'git pull';
break;