Releases Rollback. Tweaks.

This commit is contained in:
Andrs Montaez
2012-01-01 18:10:25 -02:00
parent 2e35bfe129
commit 01cbd0e447
9 changed files with 169 additions and 12 deletions
+8 -1
View File
@@ -15,7 +15,14 @@ class Mage_Task_BuiltIn_Deployment_Releases
$currentCopy = $releasesDirectory . '/' . $this->_config->getReleaseId();
$result = $this->_runRemoteCommand('ln -sf ' . $currentCopy . ' ' . $symlink);
$userGroup = '';
$resultFetch = $this->_runRemoteCommand('ls -ld ' . $currentCopy . ' | awk \'{print \$3\":\"\$4}\'', $userGroup);
$command = 'rm -f ' . $symlink
. ' && '
. 'ln -sf ' . $currentCopy . ' ' . $symlink
. ' && '
. 'chown -h ' . $userGroup . ' ' . $symlink;
$result = $this->_runRemoteCommand($command);
return $result;
} else {