Skip to content

Instantly share code, notes, and snippets.

@larowlan
Last active July 14, 2017 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larowlan/d297f7c873d67c83985a143ba8c8799b to your computer and use it in GitHub Desktop.
Save larowlan/d297f7c873d67c83985a143ba8c8799b to your computer and use it in GitHub Desktop.
#!/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
@jibran
Copy link

jibran commented Jul 14, 2017

Thanks! this is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment