Use different Gemfile.lock files for different branches:
- Symlink
Gemfile.branch1
andGemfile.branch2
toGemfile.all
. - Use the
branch-bundle
script instead ofbundle
.
#!/usr/bin/ruby | |
require 'localconfig/config' | |
ENV['BUNDLE_GEMFILE'] = "Gemfile.#{LocalConfig.branch}" | |
exec ['bundle']*2, *ARGV |