Created
September 20, 2012 17:10
-
-
Save jasonrhodes/3757112 to your computer and use it in GitHub Desktop.
Checks for changes in composer.json and alerts to update in a post-merge hook
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 | |
# | |
# To enable this hook, rename this file to "post-merge". | |
# We could probably run composer update here, but this is safer for now | |
if git diff --name-only HEAD^1 | grep composer.json >/dev/null | |
then | |
echo ' ' | |
echo '#############################################################################' | |
echo 'Changes made to the composer.json file' | |
echo ' ' | |
echo 'You might need to run "$ php composer.phar update" to get new packages' | |
echo 'Changes made:' | |
git diff HEAD^1 composer.json | |
echo '#############################################################################' | |
echo ' ' | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment