2019-11-20 22:18:16 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
|
|
|
|
|
|
|
|
runOnChange() {
|
2020-09-18 18:36:04 +00:00
|
|
|
if echo "$changedFiles" | grep -q "$1"
|
|
|
|
then
|
|
|
|
eval "$2"
|
|
|
|
fi
|
2019-11-20 22:18:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
runOnChange "package-lock.json" "npm install"
|
|
|
|
runOnChange "composer.lock" "composer install"
|