mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-23 08:45:04 +01:00
Create after checked source directory
This commit is contained in:
parent
61dded685d
commit
b697de7d1d
@ -16,11 +16,12 @@ task('deploy:copy_dirs', function () {
|
||||
foreach ($dirs as $dir) {
|
||||
$path = "{{deploy_path}}/releases/{$releases[0]}/$dir";
|
||||
|
||||
// Create destination dir(needed for nested dirs)
|
||||
run("mkdir -p {{release_path}}/$dir");
|
||||
|
||||
// Copy if dir exists.
|
||||
if (test("[ -d $path ]")) {
|
||||
|
||||
// Create destination dir(needed for nested dirs)
|
||||
run("mkdir -p {{release_path}}/$dir");
|
||||
|
||||
run("rsync -av $path/ {{release_path}}/$dir");
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user