Code refactoring.

This commit is contained in:
Andrés Montañez
2014-06-12 16:45:40 -03:00
parent 12f42dc110
commit d17dd0eb27
9 changed files with 11 additions and 13 deletions
@@ -21,7 +21,7 @@ class LinkSharedFilesTask extends AbstractTask implements IsReleaseAware
* Runs the task
*
* @return boolean
* @throws Exception
* @throws \Exception
* @throws \Mage\Task\ErrorWithMessageException
* @throws SkipException
*/
+1 -1
View File
@@ -321,7 +321,7 @@ class EncryptTask extends AbstractTask
*
* @see \Mage\Task\AbstractTask::run()
*
* @return boolan
* @return bool
* @throws \Mage\Task\ErrorWithMessageException
*/
public function run() {
+2 -2
View File
@@ -37,7 +37,7 @@ class ListTask extends AbstractTask implements IsReleaseAware
if ($this->getConfig()->release('enabled', false) == true) {
$releasesDirectory = $this->getConfig()->release('directory', 'releases');
$symlink = $this->getConfig()->release('symlink', 'current');
Console::output('Releases available on <dark_gray>' . $this->getConfig()->getHost() . '</dark_gray>');
// Get Releases
@@ -46,7 +46,7 @@ class ListTask extends AbstractTask implements IsReleaseAware
$releases = ($output == '') ? array() : explode(PHP_EOL, $output);
// Get Current
$result = $this->runCommandRemote('ls -l ' . $symlink, $output);
$result = $this->runCommandRemote('ls -l ' . $symlink, $output) && $result;
$currentRelease = explode('/', $output);
$currentRelease = trim(array_pop($currentRelease));
+1 -1
View File
@@ -87,7 +87,7 @@ class ChangeBranchTask extends AbstractTask
$branch = $this->getParameter('branch', $scmData['branch']);
$command = 'git checkout ' . $branch;
$result = $this->runCommandLocal($command);
$result = $this->runCommandLocal($command) && $result;
self::$startingBranch = $currentBranch;
} else {