mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-07 16:22:15 +02:00
Add optional symlink
This commit is contained in:
parent
e30de6b719
commit
3f22cc6288
|
@ -41,7 +41,9 @@ class ReleaseTask extends AbstractTask implements ExecuteOnRollbackInterface
|
||||||
$hostPath = rtrim($this->runtime->getEnvOption('host_path'), '/');
|
$hostPath = rtrim($this->runtime->getEnvOption('host_path'), '/');
|
||||||
$releaseId = $this->runtime->getReleaseId();
|
$releaseId = $this->runtime->getReleaseId();
|
||||||
|
|
||||||
$cmdLinkRelease = sprintf('cd %s && ln -snf releases/%s current', $hostPath, $releaseId);
|
$symlink = $this->runtime->getEnvOption('symlink', 'current');
|
||||||
|
|
||||||
|
$cmdLinkRelease = sprintf('cd %s && ln -snf releases/%s %s', $hostPath, $releaseId, $symlink);
|
||||||
|
|
||||||
/** @var Process $process */
|
/** @var Process $process */
|
||||||
$process = $this->runtime->runRemoteCommand($cmdLinkRelease, false, null);
|
$process = $this->runtime->runRemoteCommand($cmdLinkRelease, false, null);
|
||||||
|
|
Loading…
Reference in a new issue