-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #211 from akeneo/API-1693-create-a-makefile-for-ap…
…i-php-client API-1693 - Create a Makefile
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
DOCKER_RUN = docker-compose run client_72 | ||
|
||
.PHONY: help | ||
help: | ||
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-25s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/' | ||
|
||
.PHONY: dependencies | ||
dependencies: ## Install composer dependencies | ||
cp docker-compose.yml.dist docker-compose.yml | ||
rm -rf composer.lock vendor/ | ||
$(DOCKER_RUN) composer install | ||
|
||
.PHONY: tests | ||
tests: ## Run PHPUnit & PHPSpec tests, and code style check | ||
@echo "-----------" | ||
@echo "- PHPUnit -" | ||
@echo "-----------" | ||
$(DOCKER_RUN) bin/phpunit -c phpunit.xml.dist | ||
@echo "" | ||
@echo "-----------" | ||
@echo "- PHPSpec -" | ||
@echo "-----------" | ||
$(DOCKER_RUN) bin/phpspec run | ||
@echo "------------------" | ||
@echo "- PHP code style -" | ||
@echo "------------------" | ||
$(DOCKER_RUN) bin/php-cs-fixer fix --diff --dry-run --config=.php_cs.php -vvv | ||
|
||
.PHONY: fix-cs | ||
fix-cs: ## Fix PHP code style | ||
$(DOCKER_RUN) bin/php-cs-fixer fix --config=.php_cs.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters