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

Changed the way to copy composer's vendors #585

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

pimolo
Copy link

@pimolo pimolo commented Sep 17, 2015

Currently, here is the way Capifony copies dependencies in a new release :

run "vendorDir=#{current_path}/vendor; if [ -d $vendorDir ] || [ -h $vendorDir ]; then cp -a $vendorDir #{latest_release}/vendor; fi;"

It works pretty fine except for one case : if I decide to not sharing vendors anymore (by adding vendor/ in :shared_children) copying these (setting :copy_vendors to true), while I have already deployed at least one release with the first configuration.
In this case, my current release contains a symlink that points on shared/vendor/.
Now, if I want to copy the dependencies and not sharing them to all releases, I will change my configuration like above.
Ok, but when I'll deploy my app, Capifony will copy the symlink of the current release into the new release, and composer install will actually occurs into the shared folder. This is the behaviour we have when sharing vendors.
And all this causes known issues with rollback fails, downtimes on deployments... (IMO this is why sharing vendors is a very bad practise, and this deserves its place in the doc)
So changing my configuration is not enough in this case. I want to copy the content of the vendor/ folder, not the symlink itself.
This pull request suggest exactly that behaviour. It should break nothing for current users of this feature.

@pimolo pimolo changed the title Changed the way to copying composer's vendors Changed the way to copy composer's vendors Sep 17, 2015
@pimolo
Copy link
Author

pimolo commented Sep 17, 2015

I want to thank @rjmunro for this idea #274 (comment) :)

@rjmunro
Copy link
Contributor

rjmunro commented May 4, 2016

@everzet Can this be merged?

@Nek-
Copy link

Nek- commented May 4, 2016

Omg, they are the same !

youngpimo

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.

3 participants