-
-
Save snnwolf/9642da74e667abe24f76 to your computer and use it in GitHub Desktop.
git hook to update composer dependencies only if changed
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/bash | |
OLD=`md5 -q composer.lock.old` | |
NEW=`md5 -q composer.lock` | |
if [ "$NEW" != "$OLD" ] | |
then | |
rm -rf vendor | |
php composer.phar install | |
fi | |
cat composer.lock > composer.lock.old |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment