Skip to content

Instantly share code, notes, and snippets.

@obfusk
Forked from noxqsgit/README.md
Last active December 28, 2015 08:49
Show Gist options
  • Save obfusk/7474483 to your computer and use it in GitHub Desktop.
Save obfusk/7474483 to your computer and use it in GitHub Desktop.
different Gemfile.lock files for different branches

Use different Gemfile.lock files for different branches:

  • Symlink Gemfile.branch1 and Gemfile.branch2 to Gemfile.all.
  • Use the branch-bundle script instead of bundle.
#!/usr/bin/ruby
require 'localconfig/config'
ENV['BUNDLE_GEMFILE'] = "Gemfile.#{LocalConfig.branch}"
exec ['bundle']*2, *ARGV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment