tridactyl/hooks/post-merge

17 lines
311 B
Text
Raw Permalink Normal View History

2017-11-24 11:12:42 +00:00
#!/usr/bin/env bash
2017-11-21 20:31:30 +00:00
# stolen from https://gist.github.com/sindresorhus/7996717
echo "Running post-merge hook..."
2017-11-21 20:31:30 +00:00
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
file_changed() {
echo "$changed_files" | grep --quiet "$1"
2017-11-21 20:31:30 +00:00
}
if file_changed package.json; then
2019-05-31 16:48:53 +01:00
yarn install
fi