mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-05-23 08:02:15 +02:00
Fix release directory not created on first deploy
This commit is contained in:
parent
8a9aee4395
commit
3a19d3ef3c
|
@ -73,11 +73,13 @@ class RsyncTask extends BaseStrategyTaskAbstract implements IsReleaseAware
|
|||
// rsync: { copy: yes }
|
||||
$rsync_copy = $this->getConfig()->deployment('rsync');
|
||||
// If copy_tool_rsync, use rsync rather than cp for finer control of what is copied
|
||||
if ($rsync_copy && is_array($rsync_copy) && $rsync_copy['copy'] && isset($rsync_copy['copy_tool_rsync'])) {
|
||||
$this->runCommandRemote("rsync -a {$this->excludes(array_merge($excludes, $rsync_copy['rsync_excludes']))} "
|
||||
if ($rsync_copy && is_array($rsync_copy) && $rsync_copy['copy'] && is_dir("$releasesDirectory/$currentRelease")) {
|
||||
if (isset($rsync_copy['copy_tool_rsync'])) {
|
||||
$this->runCommandRemote("rsync -a {$this->excludes(array_merge($excludes, $rsync_copy['rsync_excludes']))} "
|
||||
. "$releasesDirectory/$currentRelease/ $releasesDirectory/{$this->getConfig()->getReleaseId()}");
|
||||
} elseif ($rsync_copy && is_array($rsync_copy) && $rsync_copy['copy']) {
|
||||
$this->runCommandRemote('cp -R ' . $releasesDirectory . '/' . $currentRelease . ' ' . $releasesDirectory . '/' . $this->getConfig()->getReleaseId());
|
||||
} else {
|
||||
$this->runCommandRemote('cp -R ' . $releasesDirectory . '/' . $currentRelease . ' ' . $releasesDirectory . '/' . $this->getConfig()->getReleaseId());
|
||||
}
|
||||
} else {
|
||||
$this->runCommandRemote('mkdir -p ' . $releasesDirectory . '/' . $this->getConfig()->getReleaseId());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue