Skip to content

Instantly share code, notes, and snippets.

@noxqsgit
Last active December 28, 2015 07:49
Show Gist options
  • Save noxqsgit/7467321 to your computer and use it in GitHub Desktop.
Save noxqsgit/7467321 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