mirror of
https://github.com/andres-montanez/Magallanes
synced 2024-06-16 20:45:02 +02:00
Preserve mtimes when releasing incrementally with rsync
This commit is contained in:
parent
9b75f33abe
commit
c96315103d
|
@ -75,10 +75,10 @@ class RsyncTask extends BaseStrategyTaskAbstract implements IsReleaseAware
|
||||||
// If copy_tool_rsync, use rsync rather than cp for finer control of what is copied
|
// 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'] && $this->runCommandRemote('test -d ' . $releasesDirectory . '/' . $currentRelease)) {
|
if ($rsync_copy && is_array($rsync_copy) && $rsync_copy['copy'] && $this->runCommandRemote('test -d ' . $releasesDirectory . '/' . $currentRelease)) {
|
||||||
if (isset($rsync_copy['copy_tool_rsync'])) {
|
if (isset($rsync_copy['copy_tool_rsync'])) {
|
||||||
$this->runCommandRemote("rsync -a {$this->excludes(array_merge($excludes, $rsync_copy['rsync_excludes']))} "
|
$this->runCommandRemote("rsync -rlptgom {$this->excludes(array_merge($excludes, $rsync_copy['rsync_excludes']))} "
|
||||||
. "$releasesDirectory/$currentRelease/ $releasesDirectory/{$this->getConfig()->getReleaseId()}");
|
. "$releasesDirectory/$currentRelease/ $releasesDirectory/{$this->getConfig()->getReleaseId()}");
|
||||||
} else {
|
} else {
|
||||||
$this->runCommandRemote('cp -R ' . $releasesDirectory . '/' . $currentRelease . ' ' . $releasesDirectory . '/' . $this->getConfig()->getReleaseId());
|
$this->runCommandRemote('cp -a ' . $releasesDirectory . '/' . $currentRelease . ' ' . $releasesDirectory . '/' . $this->getConfig()->getReleaseId());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->runCommandRemote('mkdir -p ' . $releasesDirectory . '/' . $this->getConfig()->getReleaseId());
|
$this->runCommandRemote('mkdir -p ' . $releasesDirectory . '/' . $this->getConfig()->getReleaseId());
|
||||||
|
|
Loading…
Reference in a new issue