-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
40 lines (29 loc) · 1.99 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
.RECIPEPREFIX +=
.PHONY: help install build up down composer console phpunit yarn gulp clean
.DEFAULT_GOAL := help
help: ## Output usage documentation
@echo "Usage: make COMMAND [-a=\"command args\"]\n\nCommands:"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
install: ## Install dependencies
make build
make composer a=install
make yarn a=install
make gulp a="build --production"
build: ## Build Docker images
docker-compose -f .docker/docker-compose.yml -f ./.docker/docker-compose.dev.yml build --force-rm
up: ## Get up and running
docker-compose -f .docker/docker-compose.yml -f ./.docker/docker-compose.dev.yml up -d --force-recreate
down: ## Shut down running containers
docker-compose -f .docker/docker-compose.yml -f ./.docker/docker-compose.dev.yml down
composer: ## Run Composer command
docker-compose -f ./.docker/docker-compose.yml -f ./.docker/docker-compose.dev.yml run --rm app composer $(a)
console: ## Run Symfony console command
docker-compose -f ./.docker/docker-compose.yml -f ./.docker/docker-compose.dev.yml run -u www-data --rm app bin/console $(a)
phpunit: ## Run PHPunit command
docker-compose -f ./.docker/docker-compose.yml -f ./.docker/docker-compose.dev.yml run --rm app ./vendor/bin/simple-phpunit $(a)
yarn: ## Run Yarn command
docker-compose -f ./.docker/docker-compose.yml -f ./.docker/docker-compose.dev.yml -f ./.docker/docker-compose.node.yml run --rm node yarn $(a)
gulp: ## Run Gulp command
docker-compose -f ./.docker/docker-compose.yml -f ./.docker/docker-compose.dev.yml -f ./.docker/docker-compose.node.yml run --rm node ./node_modules/.bin/gulp $(a)
clean: ## Removes all build files and folders except configuration
rm -rf var/cache/* var/bootstrap.php.cache var/sessions/* var/logs/* web/assets web/bundles web/android-* web/apple-* web/browserconfig.xml web/coast-228x228.png web/favicon* web/firefox* web/manifest* web/mstile* web/yandex* node_modules vendor