Added PRE and POST Deploy tasks.

This commit is contained in:
Andrs Montaez
2011-11-23 22:25:20 -02:00
parent 49481e6a38
commit b5c8ab9c87
4 changed files with 73 additions and 6 deletions
+23 -2
View File
@@ -32,10 +32,31 @@ class Mage_Config
return $config['hosts'];
}
public function getTasks()
public function getTasks($type = 'tasks')
{
switch ($type) {
case 'pre':
$type = 'pre-tasks';
break;
case 'post':
$type = 'post-tasks';
break;
case 'tasks':
default:
$type = 'tasks';
break;
}
$tasks = array();
$config = $this->getEnvironment();
return $config['tasks'];
if (isset($config[$type])) {
$tasks = (array) $config[$type];
}
return $tasks;
}
public function getConfig($host = false)