Last active
July 14, 2017 02:29
-
-
Save larowlan/d297f7c873d67c83985a143ba8c8799b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/usr/bin/make -f | |
phpcs: | |
cd drupal && vendor/bin/phpcs --standard="core/phpcs.xml.dist" `git diff --staged --name-only --diff-filter=AM` | |
phpcs-diff: | |
cd drupal && vendor/bin/phpcs --standard="core/phpcs.xml.dist" `git diff --name-only --diff-filter=AM` | |
phpcbf: | |
cd drupal && vendor/bin/phpcbf --standard="core/phpcs.xml.dist" `git diff --name-only --diff-filter=AM` | |
psalm: | |
cd drupal && psalm `git diff --staged --name-only --diff-filter=AM` --show-info=0 | |
clean84: | |
cd drupal && git fetch origin && git reset origin/8.4.x --hard && git clean -df | |
test: | |
@while [ -z "$$GROUP" ]; do \ | |
read -r -p "Filter group: " GROUP; \ | |
done ; \ | |
docker-compose run --rm php ./drupal/vendor/bin/phpunit -c ./drupal/core --filter=$$GROUP --stop-on-failure|sed 's/nginx/127.0.0.1:8000/g' | |
fix-perms: | |
-cd drupal && git diff --staged --name-only|xargs chmod 644 | |
-cd drupal && git diff --name-only|xargs chmod 644 | |
interdiff: | |
cd drupal && f=`git diff | md5sum| head -c6` && git diff > "/home/rowlands/patches/interdiff-$$f.txt" && ls /home/rowlands/patches/interdiff-$$f.txt | |
stg-interdiff: | |
cd drupal && f=`git staged | md5sum| head -c6` && git staged > "/home/rowlands/patches/interdiff-$$f.txt" && ls /home/rowlands/patches/interdiff-$$f.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks! this is helpful.