Add optional symlink

This commit is contained in:
Ante Galic 2018-06-12 15:20:37 +02:00
parent e30de6b719
commit 3f22cc6288

View file

@ -40,8 +40,10 @@ class ReleaseTask extends AbstractTask implements ExecuteOnRollbackInterface
$hostPath = rtrim($this->runtime->getEnvOption('host_path'), '/');
$releaseId = $this->runtime->getReleaseId();
$symlink = $this->runtime->getEnvOption('symlink', 'current');
$cmdLinkRelease = sprintf('cd %s && ln -snf releases/%s current', $hostPath, $releaseId);
$cmdLinkRelease = sprintf('cd %s && ln -snf releases/%s %s', $hostPath, $releaseId, $symlink);
/** @var Process $process */
$process = $this->runtime->runRemoteCommand($cmdLinkRelease, false, null);