-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
43 lines (30 loc) · 1.27 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
#!/usr/bin/make
user_id := $(shell id -u)
docker_compose_bin := $(shell command -v docker-compose 2> /dev/null) --file "docker/docker-compose.yml"
php_container_bin := $(docker_compose_bin) run --rm -u "$(user_id)" "php"
php_composer_script := $(php_container_bin) composer run-script
.PHONY : help build install shell fixer test coverage xsd entities
.DEFAULT_GOAL := build
# --- [ Development tasks ] -------------------------------------------------------------------------------------------
build: ## Build container and install composer libs
$(docker_compose_bin) build --force-rm
install: ## Install all data
$(php_container_bin) composer update
shell: ## Runs shell in container
$(php_container_bin) bash
fixer: ## Run fixer to fix code style
$(php_composer_script) fixer
linter: ## Run linter to check project
$(php_composer_script) linter
test: ## Run tests
$(php_composer_script) test
coverage: ## Run tests with coverage
$(php_composer_script) coverage
release: ## Run all tests and linters before release
$(php_composer_script) fixer
$(php_composer_script) linter
$(php_composer_script) test
xsd: ## Build entities from yaml file with description
$(php_composer_script) xsd
entities: ## Build entities from yaml file with description
$(php_composer_script) entities