Skip to content

Commit

Permalink
Build using make
Browse files Browse the repository at this point in the history
  • Loading branch information
hanneskod committed Dec 16, 2019
1 parent 0d397a2 commit d81d624
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/bob_config.php export-ignore
/behat.yml export-ignore
/CHANGELOG.md export-ignore
/Makefile export-ignore
/phpunit.xml export-ignore
/README.md export-ignore
41 changes: 41 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
BEHAT:=$(shell command -v behat 2> /dev/null)
PHPCS:=$(shell command -v phpcs 2> /dev/null)
COMPOSER_CMD:=$(shell command -v composer 2> /dev/null)

.DEFAULT_GOAL=all

.PHONY: all
all: test phpcs

.PHONY: clean
clean:
rm -rf vendor
rm -f composer.lock

.PHONY: test
test: phpunit behat

.PHONY: phpunit
phpunit: composer.lock
vendor/bin/phpunit

.PHONY: behat
behat: composer.lock
ifndef BEHAT
$(error "behat is not available, please install to continue")
endif
behat --stop-on-failure

.PHONY: phpcs
phpcs: composer.lock
ifndef PHPCS
$(error "phpcs is not available, please install to continue")
endif
phpcs src --standard=PSR2
phpcs tests --standard=PSR2

composer.lock: composer.json
ifndef COMPOSER_CMD
$(error "composer is not available, please install to continue")
endif
composer install

0 comments on commit d81d624

Please sign in to comment.