-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (49 loc) · 2.01 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
61
62
63
.DEFAULT_GOAL=help
GROUPS=all
LOCAL_DOMAIN ?= project_url
EXEC_PHP = symfony php
$(eval LAST_COMMIT = $(shell git log -1 --oneline --pretty=format:"%h - %an, %ar"))
help:
@printf "\n\n Project Name"
@printf "\n ------------"
@printf "\n"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$|^##' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
@#grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%s\033[0m %s\n", $$1, $$2}'
@#fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
@printf "\n\n"
@printf "\n\nLast release: \033[32m%s\033[0m" \
$(shell git describe --abbrev=0 --tags)
@printf "\nLast commit: "
@printf "\033[32m %s\033[0m" \
$(LAST_COMMIT)
@printf "\n\n"
##
## Setup
##---------------------------------------------------------------------------
##
up: docker-up symfony-up vendor## Start project
down: symfony-down docker-down ## Stop project
docker-up: ## Start docker mariadb
docker-compose up --build -d --remove-orphans
symfony-up: ## start the project
symfony proxy:domain:attach $(LOCAL_DOMAIN)
symfony proxy:start
symfony serve -d
docker-down: ## Stop docker mariadb
docker-compose stop
symfony-down: ## stop the project
symfony server:stop
symfony proxy:stop
vendor: ## Install dependencies locally
symfony composer install
##
## Quality
##---------------------------------------------------------------------------
##
coverage: vendor ## Execute coverage unit tests
$(EXEC_PHP) ./vendor/bin/phpunit --coverage-html --coverage-test tests
test: test-unitaire test-fonctionnel coverage ## Execute all test
test-unitaire: vendor ## Execute unitaire test
$(EXEC_PHP) ./vendor/bin/phpunit tests --testdox --colors=auto
test-fonctionnel: vendor ## a definir
symfony console