Skip to content

Instantly share code, notes, and snippets.

@ihortymoshenko
Created March 10, 2014 14:11
Show Gist options
  • Save ihortymoshenko/9465598 to your computer and use it in GitHub Desktop.
Save ihortymoshenko/9465598 to your computer and use it in GitHub Desktop.
Using Makefile as a PHP build project system. Inspired by http://jenkins-php.org
default: help
help:
@echo "Targets:"
@echo " - test"
@echo " - lint"
@echo " - phploc"
@echo " - phpcs"
@echo " - phpunit"
test: lint phploc phpcs phpunit
lint:
find -name "*.php" -not -path "./vendor/*" | php -l
phploc:
php vendor/bin/phploc --progress src/ tests/
phpcs:
php vendor/bin/phpcs --standard=PSR2 --ignore=vendor/ --extensions=php . -n -p
phpunit:
php vendor/bin/phpunit --coverage-text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment