Tweaks and fixes.

This commit is contained in:
Andrés Montañez
2014-06-12 16:17:31 -03:00
parent a97d172a6d
commit 4e01cc3517
5 changed files with 18 additions and 12 deletions
+4 -1
View File
@@ -449,7 +449,7 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
$runTask = true;
if (($task instanceOf SkipOnOverride) && $this->getConfig()->getParameter('overrideRelease', false)) {
$runTask == false;
$runTask = false;
}
$result = false;
@@ -516,6 +516,7 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
/**
* Send Email Notification if enabled
* @param boolean $result
* @return boolean
*/
protected function sendNotification($result)
{
@@ -534,6 +535,8 @@ class DeployCommand extends AbstractCommand implements RequiresEnvironment
->setLogFile(Console::getLogFile())
->setEnvironment($this->getConfig()->getEnvironment())
->send($result);
return true;
}
}
+7 -7
View File
@@ -32,7 +32,7 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
$lockFile = '.mage/' . $this->getConfig()->getEnvironment() . '.lock';
if (file_exists($lockFile) && ($subcommand == 'rollback')) {
Console::output('<red>This environment is locked!</red>', 1, 2);
return;
return null;
}
// Run Tasks for Deployment
@@ -47,17 +47,17 @@ class ReleasesCommand extends AbstractCommand implements RequiresEnvironment
switch ($subcommand) {
case 'list':
$task = Factory::get('releases/list', $this->getConfig());
$task->init();
$task = Factory::get('releases/list', $this->getConfig());
$task->init();
$result = $task->run();
break;
case 'rollback':
$releaseId = $this->getConfig()->getParameter('release', '');
$task = Factory::get('releases/rollback', $this->getConfig());
$releaseId = $this->getConfig()->getParameter('release', '');
$task = Factory::get('releases/rollback', $this->getConfig());
$task->init();
$task->setRelease($releaseId);
$result = $task->run();
$task->setRelease($releaseId);
$result = $task->run();
break;
}
}