Drupal collaboration and deployment with Git
I am working on a Drupal project where I need the following:
- Deployment using makefiles--so that whenever I re-deploy it I can get the latest version of drupal modules and don't need to maintain a repo for the drupal core.
- Also able to maintain versions for custom modules.
How do I deploy it with Git? Is it good to have a single repository for the complete project including the Drupal core in the repository o开发者_如何学编程r should we use makefiles--if makefiles then how do we manage other custom modules and themes?
Also, I would like to know how to do collaborative development in Drupal,i.e., how to keep the database in sync for all the developers?
Any other suggestions are welcomed.
Setting up your project as an install profile will solve your problems here. A nice example of this workflow can be found https://github.com/sprice/simple but it's a little out of date. You really should be specifying a version along with each project(module, theme..) in the make file so your have full control over the versions. Some install profiles will carry a "stub" makefile which will include drupal core and install your entire site. Custom modules can be included right into the install profile repo or included via the makefile. They don't need to be on drupal.org but they do need to be hosted online somewhere like github. I don't recommend using git submodules as part of your workflow as they tend to break.
All the sites I've built this year have been deployed as distributions. So all the collaborative development was handled through features that were part of the install profile repo.
Hope that helps.
精彩评论