Created
March 19, 2015 10:33
-
-
Save dmrschmidt/769cc79b20eb5f8130f2 to your computer and use it in GitHub Desktop.
dependency checking `git pull --rebase` alias
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
#!/bin/sh | |
git pull --rebase || exit 1; | |
root_path="$(git rev-parse --show-toplevel)" | |
bundle check > /dev/null; needs_bundle=$? | |
diff "${root_path}/Podfile.lock" "${root_path}/Pods/Manifest.lock" > /dev/null; needs_pod=$? | |
if [[ $needs_bundle != 0 ]] ; then | |
echo "\033[01;31m# Your bundler dependencies are outdated." | |
command="bundle install" | |
fi | |
if [[ $needs_pod != 0 ]] ; then | |
echo "\033[01;31m# Your CocoaPods dependencies are outdated." | |
if [[ $command != "" ]]; then command=" $command && "; fi | |
command="${command}pod install" | |
fi | |
echo "\033[00;00m${command}" |
garriguv
commented
Mar 19, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment