Created
November 13, 2014 17:13
-
-
Save ivoba/6dcdff1d8eaed7e53ec6 to your computer and use it in GitHub Desktop.
post-merge hook for composer php apps
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
#/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# forked by Gianluca Guarini | |
# phponly by Ivo Bathke ;) | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" | |
} | |
# `composer install` if the `composer.lock` file gets changed | |
# to update all the php dependencies | |
check_run composer.lock "composer install --no-dev" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thx:
https://gist.github.com/sindresorhus/7996717
thx:
https://gist.github.com/GianlucaGuarini/8001627