Created
September 13, 2011 01:01
-
-
Save rdj/1212895 to your computer and use it in GitHub Desktop.
check bundler version when deploying to make sure you're not deploying with old cap recipes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # You could hard-code this, but we keep the current bundler version | |
| # everybody is supposed to use in a default.gems file. So you can | |
| # | |
| # rvm gemset empty | |
| # rvm gemset import | |
| # bundle install --local | |
| # | |
| # And you're in a known good state. | |
| expected_bunder_version = File.read( File.join( File.dirname( __FILE__ ), '..', 'default.gems' ) ).match( 'bundler -v(\S+)' )[1] | |
| if Bundler::VERSION != expected_bunder_version | |
| abort "Refusing to deploy with Bundler v#{Bundler::VERSION} (expecting v#{expected_bunder_version})" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment