forked from phasync/phasync
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (50 loc) · 1.13 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Define variables
PHP = php
COMPOSER = composer
PEST = vendor/bin/pest
PHP_CS_FIXER = vendor/bin/php-cs-fixer
# Directories
SRC_DIR = src
TESTS_DIR = tests
# Default target
.PHONY: all
all: install test lint
# Install dependencies
.PHONY: install
install:
$(COMPOSER) install
# Run tests
.PHONY: test-all
test:
$(PEST)
#Run test until defect
.PHONY: test
test:
$(PEST) --stop-on-defect
# Check code quality with PHP-CS-Fixer (dry-run)
.PHONY: lint
lint:
$(PHP_CS_FIXER) fix --config .php-cs-fixer.dist.php --dry-run --diff
# Automatically fix coding style issues with PHP-CS-Fixer
.PHONY: fix
fix:
$(PHP_CS_FIXER) fix
# Clean up generated files
.PHONY: clean
clean:
rm -rf vendor
rm -rf var/cache
# Update dependencies
.PHONY: update
update:
$(COMPOSER) update
# Show help message
.PHONY: help
help:
@echo "Usage:"
@echo " make install - Install dependencies"
@echo " make test - Run tests"
@echo " make clean - Clean up generated files"
@echo " make lint - Check the coding standards"
@echo " make fix - Fix all file with PHP-CS-Fixer coding standards"
@echo " make update - Update dependencies"