Browse Source

Merge pull request #78 from spongeben/bugfix

Fix hard coded 'current' symlink path in RsyncTask
1.0
Andrés Montañez 10 years ago
parent
commit
b229e69c45
  1. 3
      Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php

3
Mage/Task/BuiltIn/Deployment/Strategy/RsyncTask.php

@ -56,12 +56,13 @@ class RsyncTask extends BaseStrategyTaskAbstract implements IsReleaseAware
$deployToDirectory = $this->getConfig()->deployment('to'); $deployToDirectory = $this->getConfig()->deployment('to');
if ($this->getConfig()->release('enabled', false) == true) { if ($this->getConfig()->release('enabled', false) == true) {
$releasesDirectory = $this->getConfig()->release('directory', 'releases'); $releasesDirectory = $this->getConfig()->release('directory', 'releases');
$symlink = $this->getConfig()->release('symlink', 'current');
$currentRelease = false; $currentRelease = false;
$deployToDirectory = rtrim($this->getConfig()->deployment('to'), '/') $deployToDirectory = rtrim($this->getConfig()->deployment('to'), '/')
. '/' . $releasesDirectory . '/' . $releasesDirectory
. '/' . $this->getConfig()->getReleaseId(); . '/' . $this->getConfig()->getReleaseId();
$resultFetch = $this->runCommandRemote('ls -ld current | cut -d"/" -f2', $currentRelease); $resultFetch = $this->runCommandRemote('ls -ld ' . $symlink . ' | cut -d"/" -f2', $currentRelease);
if ($resultFetch && $currentRelease) { if ($resultFetch && $currentRelease) {
// If deployment configuration is rsync, include a flag to simply sync the deltas between the prior release // If deployment configuration is rsync, include a flag to simply sync the deltas between the prior release

Loading…
Cancel
Save