-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile
105 lines (76 loc) · 3.25 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
.PHONY: help debug stop start clean pull build test-all shell ps logs cc composer-validate fixtures composer-install
DOCKER_COMP = docker compose
help:
@echo ''
@echo 'PuMuKIT makefile'
@echo ''
@echo 'Usage:'
@echo ' make up Deploy all the containers'
@echo ' make debug Deploy all the containers with debug log'
@echo ' make stop Stop all the containers'
@echo ' make start Start stopped containers'
@echo ' make clean Remove all the containers'
@echo ' make pull Download container images from registry'
@echo ' make build build project docker images'
@echo ' make test-all Run the PuMuKIT code tests'
@echo ' make shell Attach to tte PuMuKIT tty'
@echo ' make ps List service state'
@echo ' make logs Show the log of all services'
@echo ' make cc Clear cache and install assets'
@echo ' make composer-validate Validate composer'
@echo ' make fixtures Import basic fixtures'
@echo ' make composer-install Install composer dependencies'
current-dir := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
dynamic_docker_php_name := $(shell echo $(notdir $(shell pwd) | tr A-Z a-z))_php_1
up:
@$(DOCKER_COMP) up -d
start:
@$(DOCKER_COMP) start
stop:
@$(DOCKER_COMP) stop
clean: stop
@$(DOCKER_COMP) rm -f
debug:
@$(DOCKER_COMP) up
pull:
@$(DOCKER_COMP) pull
build:
@$(DOCKER_COMP) build
cc-envs:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php bin/console c:c
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php bin/console c:c --env=prod
ai:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php bin/console a:i --symlink --relative
cc: cc-envs ai
# Composer
composer-install: CMD=install
composer-update: CMD=update
composer-install composer-update:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php composer $(CMD)
composer-validate:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php composer validate
fixtures:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php bin/console pumukit:init:repo all --force
test-all: test test-lint-yaml test-lint-twig test-lint-generic test-php-cs-fixer test-php-stan test-rector
test:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php composer tests
test-lint-yaml:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php composer lint-yaml
test-lint-twig:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php composer lint-twig
test-lint-xliff:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php composer lint-xliff
test-lint-generic:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php composer lint-generic
test-php-cs-fixer:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php composer php-cs-fixer
test-php-stan:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php composer php-stan
test-rector:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php composer php-rector
shell:
@$(DOCKER_COMP) -f docker-compose.yml run --service-ports php sh
ps:
@$(DOCKER_COMP) ps
logs:
@$(DOCKER_COMP) logs -f --tail=100