Skip to content

Commit 9cd3ef9

Browse files
authored
Merge pull request #898 from henriquebremenkanp/master
Allow subfolders copy
2 parents fb799d7 + 3d60adf commit 9cd3ef9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

recipe/deploy/shared.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
$sharedPath = "{{deploy_path}}/shared";
1313

1414
foreach (get('shared_dirs') as $dir) {
15+
$parentDir = dirname($dir);
16+
1517
// Create shared dir if it does not exist.
1618
run("mkdir -p $sharedPath/$dir");
1719

1820
// Copy shared dir files if they does not exist.
19-
run("if [ -d $(echo {{release_path}}/$dir) ]; then cp -rn {{release_path}}/$dir $sharedPath; fi");
21+
run("if [ -d $(echo {{release_path}}/$dir) ]; then cp -rn {{release_path}}/$dir $sharedPath/$parentDir; fi");
2022

2123
// Remove from source.
2224
run("if [ -d $(echo {{release_path}}/$dir) ]; then rm -rf {{release_path}}/$dir; fi");

0 commit comments

Comments
 (0)