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

Include vendors to deploy #16

Open
bashmach opened this issue May 26, 2015 · 11 comments
Open

Include vendors to deploy #16

bashmach opened this issue May 26, 2015 · 11 comments

Comments

@bashmach
Copy link

Hi, Fadion!
First of all, big thanks for the tool. This looks super useful for automatically deploy of laravel applications to servers without SSH access.
But I see one very important issue - how to deal with vendors? It's horribly wrong to have them added to the repository, but in the same time I can't see now a way to deploy them with other project files.
I'm going to add this ability and send you PR, but first I decided to find out your opinion.

@fadion
Copy link
Owner

fadion commented May 26, 2015

The issue has been opened up, but I haven't had the time to deal with it.

A solution would be adding an --with-vendor option when deploying to force upload /vendor. Another solution, suggested by a member, would be to automatically upload /vendor when composer.json is changed in the commit. This is totally open for discussion, so please let me know what you think.

@banago your input on the issue would be quite valuable.

@banago
Copy link

banago commented May 26, 2015

Over at PHPloy we have implemented this option to address this:

--others               Uploads files even if they are excluded in .gitignore

However, it seems like this will upload everything, not only the vendor directory. That will be easy to implement on Maneuver too.

Though I reckon there is a better option. I think reversing the implementation of the skip[] option as ˙include[]` to allow users to determine exactly what they needed included.

--with-vendor would work just fine too, since this is a Laravel specific package and that will address 80% of the needs hopefully.

@bashmach
Copy link
Author

As for me, I would like to implement a solution when Maneuver check composer.lock for changes and if so, will add new/changed vendors to upload list. But currently I have no idea how to fetch only changed vendors. Hope to find a solution in the nearest future.

@p-v-d-Veeken
Copy link

Any update on this issue? would be very useful to have

@fadion
Copy link
Owner

fadion commented Jan 24, 2016

I've left it open to suggestions for any good and simple solution.

Personally haven't find a way that:

  1. Doesn't overcomplicate the project. Manually managing the changes of vendor files is pointless and complicated. I'm not reinventing version control.
  2. Adding a --with-vendor option would work and would be easy to implement, but I highly doubt it's usability. Pushing a million files in the vendor folder just because one has updated one or two packages, just doesn't make sense to me.

@p-v-d-Veeken
Copy link

Perhaps a --with-vendor[folder1, folder2,..., etc] option? One would need to manually specify which vendor folders to deploy, but imo this is still preferable to the alternative.

@Pimmetje
Copy link

Pimmetje commented Oct 6, 2016

Maybe we can have some way of making a hash of every subfoler of the vender folder. Or sub-sub folder if needed. When requested with --vender download the hashes file from the server. Recalculate the local version upload the folders were the hash does not match. Upload the new hashes to the server.

Does not need to be hashes. Could be anything that detects folder changes and is comparable.

Anyone any workaround i could use for now?

@Pimmetje
Copy link

Pimmetje commented Nov 8, 2016

@banago / @fadion I would like to know if u think this is doable?

@fadion Would u accept a solution like this?

@ghost
Copy link

ghost commented Jul 27, 2018

Just like there's 'ignored' in config/maneuver.php, there should be 'included' - for files that will be included even if they're in .gitignore.

@ghost
Copy link

ghost commented Jul 28, 2018

Another solution, suggested by a member, would be to automatically upload /vendor when composer.json is changed in the commit. This is totally open for discussion, so please let me know what you think.

I think this is a good idea, but if vendor/ isn't added to git, you'd need some mechanism to check which files have changed and upload only those.

Would be probably best to somehow have a separate git repository in vendor/

@ghost
Copy link

ghost commented Aug 2, 2018

Another solution that doesn't involve using git for vendor/ would be to have (after initial vendor deployment) a txt file on the server that would look like

composer 8mo7mhi6j0s4sblncvg1
fadion 8tig0g6llr43uwftugcz
laravel whddzja17e96a542meb7

Folder name, hash of contents. Maneuver would

  1. Check for folders that are missing on the server: add them
  2. Check for folders that are on the server but not on the local machine: delete them from server
  3. Check for folders whose hash doesn't match: reupload the whole folder

This could be done more efficiently by tracking specifically what has changed inside the folder, but that's too complex. Uploading a big folder to the server is in any case better than uploading entire vendor/.

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

No branches or pull requests

5 participants