-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
49 lines (34 loc) · 1.39 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
DOCKER_COMPOSE=docker-compose
TOOLS = $(DOCKER_COMPOSE) run --rm tools
stop: ## Kill all containers
$(DOCKER_COMPOSE) kill
clean: ## Remove all containers with their volumes
$(DOCKER_COMPOSE) down -v --remove-orphans || true
build: ## Build all docker images
$(DOCKER_COMPOSE) pull
$(DOCKER_COMPOSE) build
start: ## Start containers and make sure they are ready
$(DOCKER_COMPOSE) up --no-recreate --remove-orphans -d
$(DOCKER_COMPOSE) run --rm wait
vendors: ## Install any project dependencies
$(TOOLS) composer install
$(TOOLS) bin/console cache:clear
$(TOOLS) bin/console assets:install --symlink --relative
database: ## Create database and load migrations
$(TOOLS) bin/console doctrine:database:create -n --if-not-exists
# $(TOOLS) bin/console doctrine:migration:migrate -n
fixture: ## Load database fixtures
# $(TOOLS) bin/console hautelook:fixtures:load -n
restart: clean install ## Clean containers and volumes and install the project
install: build start vendors database fixture ## Bootstrap the whole project
cs: ## Automatically fix php code style
$(TOOLS) vendor/bin/php-cs-fixer fix
cs-lint: ## Detect any php code style issue
$(TOOLS) vendor/bin/php-cs-fixer fix --dry-run --diff
phpunit: ## Run phpunit tests
$(TOOLS) bin/phpunit
behat: ## Run behat tests
$(TOOLS) vendor/bin/behat
test: phpunit behat ## Run all tests
consume:
$(TOOLS) bin/console messenger:consume command -vv