Skip to content

Instantly share code, notes, and snippets.

@larowlan
Last active July 14, 2017 02:29
Show Gist options
  • Select an option

  • Save larowlan/d297f7c873d67c83985a143ba8c8799b to your computer and use it in GitHub Desktop.

Select an option

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

jibran commented Jul 14, 2017

Copy link
Copy Markdown

Thanks! this is helpful.

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