Skip to content

Commit

Permalink
Adding Makefile support.
Browse files Browse the repository at this point in the history
  • Loading branch information
allebb committed Aug 25, 2017
1 parent 46cedb0 commit e1987e8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@
/report
.DS_Store
Thumbs.db
!*.yml
!*.yml
/.php_cs.cache
/php-cs-fixer.phar
28 changes: 28 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
PHPCSFIXER_RELEASE=$(shell curl -s "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/releases/latest" | grep browser_download_url | cut -d '"' -f 4)

install: check
@composer install

check:
@composer --version > /dev/null

fix:
@echo Downloading... $(PHPCSFIXER_RELEASE)
curl -LO -s "$(PHPCSFIXER_RELEASE)"
@echo Running PHP-CS-Fixer...
php php-cs-fixer.phar fix ./src/
php php-cs-fixer.phar fix ./tests/

clean:
rm php-cs-fixer.phar
rm .php_cs.cache
rm -r report
rm -r vendor

test:
./vendor/bin/phpunit

coverage:
./vendor/bin/phpunit --coverage-html ./report

.PHONY: install check clean fix coverage

0 comments on commit e1987e8

Please sign in to comment.