Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaced repo/* with repo/. so it will copy all files including hidden #89

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dataneger
Copy link

I have noticed that in the DefaultDeployer.php you copy the folder with the following command.
cp -RPp {{ deploy_dir }}/repo/* {{ project_dir }}
But the wildcard (*) filemask skips hidden files starting with a dot (.gitignore, .env.test).
To do a full copy including hidden files you should use the dot instead of the wildcard
cp -RPp {{ deploy_dir }}/repo/. {{ project_dir }}
This should result in a compleet copy of the repo directory into the release directory.

In my case we use .env.test .env.prod files and we wanted to copy them to .env but the files weren't copied so i got an error.
If the wildcard is intentional to prevent security issues i can understand. But in my opinion it should copy the complete directory to prevent weird behavior.

@dataneger
Copy link
Author

The error on continuous-integration/travis-ci/pr is caused by a composer install error not the code inside the pr that is failing.

@dataneger
Copy link
Author

For people still wanting to use hidden files. The work around i used was:

$this->runRemote('cp {{ deploy_dir }}/repo/.hiddenfile {{ project_dir }}/.hiddenfile');

@dataneger
Copy link
Author

I understand that you don't want to copy the .git folder to the release folder. So maybe we can just exclude that instead of all hidden files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant