Created
March 6, 2024 12:26
-
-
Save jlabs/6989c9b0de088cea5e3e4380ab3d4cb2 to your computer and use it in GitHub Desktop.
Git hook for DDEV + Craft CMS changes on git pull
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
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" | |
} | |
check_run composer.json "ddev composer install" | |
check_run package.json "ddev npm i" | |
check_run "/config/project/" "ddev craft project-config/apply" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment