Merge pull request #25087 from woocommerce/add/post-merge
Introduced GIT post-merge hook to update NPM and Composer dependencies
This commit is contained in:
commit
641a4c1890
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
|
||||||
|
|
||||||
|
runOnChange() {
|
||||||
|
echo "$changedFiles" | grep -q "$1" && eval "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
runOnChange "package-lock.json" "npm install"
|
||||||
|
runOnChange "composer.lock" "composer install"
|
|
@ -71,7 +71,8 @@
|
||||||
},
|
},
|
||||||
"husky": {
|
"husky": {
|
||||||
"hooks": {
|
"hooks": {
|
||||||
"pre-commit": "lint-staged"
|
"pre-commit": "lint-staged",
|
||||||
|
"post-merge": "./bin/post-merge.sh"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
|
|
Loading…
Reference in New Issue