mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-08 08:42:14 +02:00
Add optional symlink
This commit is contained in:
parent
e30de6b719
commit
3f22cc6288
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue