The Problem
I have a Rails 3.1 app on Heroku which will soon require a bunch of (3rd party) submodules (some of which have submodules). Unfortunately, Heroku lacks submodule support. One suggestion on Heroku's website is to move the contents of the submodules into the main repo (here). This will work fine the first time, but there is a possibility that it won't the second. This could be caused by a major update in one of the third party submodules where a fast forward merge is unsuccessful. Obviously we can't manually merge a third party project.
The "Solution"
Our tentative solution is as follows:
- Create a new 'temp' branch based on the latest stable dev branch and merge the submodules into the project.
- Checkout to a
heroku
branch. - Nuke the contents of this
heroku
branch to avoid any possible conflicts, i.e. create a commit with everything deleted. - Merge the temp branch into the
heroku
branch. - Push this
heroku
branch to our Heroku server.
The Advantages
This will avoid any possible conflicts in third party submodules and is scriptable.
The Disadvantages
This is extremely inelegant and is the ultimate anti-pattern for SVC.
The Question
Is there a better way to do this?