mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-28 10:08:56 +02:00
Added PRE and POST Deploy tasks.
This commit is contained in:
+23
-2
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user