|
1 | 1 | .PHONY: help |
2 | 2 | .DEFAULT_GOAL := help |
3 | | - |
4 | 3 | $(VERBOSE).SILENT: |
5 | 4 |
|
6 | | -help: |
7 | | - grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ |
8 | | - cut -d: -f2- | \ |
9 | | - sort -d | \ |
10 | | - awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-16s\033[0m %s\n", $$1, $$2}' |
11 | | - |
12 | | -.PHONY: up down test phpstan cs cs-fix composer-install composer-update release |
| 5 | +help: ## Print the help screen |
| 6 | + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
13 | 7 |
|
14 | | -up: |
| 8 | +up: ## Start the Docker-based web server in order to try out the examples |
15 | 9 | docker-compose -f docker-compose.examples.yml stop --timeout=2 && docker-compose -f docker-compose.examples.yml up -d |
16 | 10 |
|
17 | | -down: |
| 11 | +down: ## Stop the Docker-based web server |
18 | 12 | docker-compose -f docker-compose.examples.yml stop --timeout=2 |
19 | 13 |
|
20 | | -test: |
| 14 | +composer-install: ## Install Composer dependencies |
| 15 | + docker run --rm --interactive --tty --volume $(PWD):/app --user $(id -u):$(id -g) composer install --ignore-platform-reqs |
| 16 | + |
| 17 | +composer-update: ## Update Composer dependencies |
| 18 | + docker run --rm --interactive --tty --volume $(PWD):/app --user $(id -u):$(id -g) composer update --ignore-platform-reqs |
| 19 | + |
| 20 | +test: ## Run PHPUnit for the unit tests |
21 | 21 | docker-compose run --rm --no-deps worm-php /bin/sh -c "./vendor/bin/phpunit" |
22 | 22 |
|
23 | | -phpstan: |
| 23 | +phpstan: ## Run PHPStan to perform static analysis |
24 | 24 | docker-compose run --rm --no-deps worm-php /bin/sh -c "./vendor/bin/phpstan analyse --level 7 src tests" |
25 | 25 |
|
26 | | -cs: |
| 26 | +cs: ## Run PHP CodeSniffer to detect issues with coding style |
27 | 27 | docker-compose run --rm --no-deps worm-php /code/vendor/bin/phpcs --standard=/code/phpcs.xml |
28 | 28 |
|
29 | | -cs-fix: |
| 29 | +cs-fix: ## Run PHPCBF to automatically fix issues with coding style |
30 | 30 | docker-compose run --rm --no-deps worm-php /code/vendor/bin/phpcbf --standard=/code/phpcs.xml |
31 | 31 |
|
32 | | -composer-install: |
33 | | - docker run --rm --interactive --tty --volume $(PWD):/app --user $(id -u):$(id -g) composer install --ignore-platform-reqs |
34 | | - |
35 | | -composer-update: |
36 | | - docker run --rm --interactive --tty --volume $(PWD):/app --user $(id -u):$(id -g) composer update --ignore-platform-reqs |
37 | | - |
38 | | -release: test phpstan cs |
| 32 | +release: test phpstan cs ## Release a new version of the library |
39 | 33 | ./vendor/bin/releaser release |
0 commit comments