woocommerce/bin/post-merge.sh

14 lines
265 B
Bash
Executable File

#!/bin/bash
changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
runOnChange() {
if echo "$changedFiles" | grep -q "$1"
then
eval "$2"
fi
}
runOnChange "package-lock.json" "npm install"
runOnChange "composer.lock" "composer install"