This repository has been archived by the owner on Dec 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
58 lines (46 loc) · 1.91 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
.DEFAULT_GOAL=help
GROUPS=all
LOCAL_DOMAIN ?= api.nabophial.com
EXEC_PHP = symfony php
$(eval LAST_COMMIT = $(shell git log -1 --oneline --pretty=format:"%h - %an, %ar"))
help:
@printf "\n api-nabophial"
@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"
@printf "\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"
##
## Setup
##---------------------------------------------------------------------------
##
up: symfony-up vendor## Start project
down: symfony-down docker-down ## Stop project
symfony-up: ## start the project
symfony proxy:domain:attach $(LOCAL_DOMAIN)
symfony proxy:start
symfony server:ca:install
symfony serve -d
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 unit tests
$(EXEC_PHP) ./vendor/bin/phpunit tests --testdox --colors=always
test-fonctionnel: vendor ## Execute functional tests
symfony console