Last active
March 30, 2022 20:25
-
-
Save jhirbour/1b1e621f9084cdfa5b85fffee762fc15 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/sh | |
bundler_version=$(bundler --version | awk '{print $3}') | |
gemfile_version=$(tail -1 Gemfile.lock | awk '{print $1}') | |
echo "bundler_version is $bundler_version" | |
echo "gemfile_version is $gemfile_version" | |
if [ "$bundler_version" = "$gemfile_version" ]; then | |
bundler "$@" | |
else | |
echo "ALERT!!!! *** CHANGE YOUR BUNDLER VERSION!!!! ***" | |
echo "You probably want to run 'gem install bundler:$gemfile_version'" | |
exit 1 | |
fi; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment