forked from SyliusCrafts/BootstrapTheme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (48 loc) · 2.29 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
##
## Project setup
##---------------------------------------------------------------------------
.PHONY: install start stop clean
install: start ## Install requirements for tests
sudo chmod -Rf 777 tests/Application/var
sudo chmod -Rf 777 tests/Application/public/media
docker-compose exec php php -d memory_limit=-1 /usr/bin/composer install
docker-compose exec nodejs yarn --cwd tests/Application install
docker-compose exec php tests/Application/bin/console doctrine:database:create --if-not-exists -vvv
docker-compose exec php tests/Application/bin/console doctrine:schema:create -vvv
docker-compose exec php tests/Application/bin/console assets:install tests/Application/public -vvv
docker-compose exec nodejs yarn --cwd tests/Application build
docker-compose exec php php -d memory_limit=-1 tests/Application/bin/console cache:warmup -vvv
docker-compose exec php tests/Application/bin/console sylius:fixtures:load -n
start: ## Start the project
docker-compose up -d
stop: ## Stop and clean
docker-compose kill
docker-compose rm -v --force
clean: stop ## Clean plugin
docker-compose down -v
sudo rm -Rf node_modules vendor .phpunit.result.cache composer.lock
##
## Assets
##---------------------------------------------------------------------------
.PHONY: assets assets-watch
assets: ## Build assets for dev environment
docker-compose exec nodejs yarn --cwd tests/Application dev
assets-watch: ## Watch asset during development
docker-compose exec nodejs yarn --cwd tests/Application watch
##
## QA
##---------------------------------------------------------------------------
.PHONY: validate behat ci
validate: ## Validate composer.json
docker-compose exec php composer validate --ansi --strict
behat: ## Run behat
docker-compose exec php php -d memory_limit=-1 vendor/bin/behat --profile docker --colors --strict -vvv -f progress --no-interaction --tags="@javascript && ~@todo && ~@cli"
ci: validate behat ## Execute github actions tasks
##
## Utilities
##---------------------------------------------------------------------------
.PHONY: help
help: ## Show all make tasks (default)
@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/'
-include Makefile.local