mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 17:22:41 +01:00
15 lines
404 B
PHP
15 lines
404 B
PHP
<?php
|
|
namespace Deployer;
|
|
|
|
desc('Copy directories');
|
|
task('deploy:copy_dirs', function () {
|
|
if (has('previous_release')) {
|
|
foreach (get('copy_dirs') as $dir) {
|
|
if (test("[ -d {{previous_release}}/$dir ]")) {
|
|
run("mkdir -p {{release_path}}/$dir");
|
|
run("rsync -av {{previous_release}}/$dir/ {{release_path}}/$dir");
|
|
}
|
|
}
|
|
}
|
|
});
|