-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
84 lines (59 loc) · 2.6 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
SYMFONY_CLI=symfony
PHP_CS_FIXER=php ./tools/bin/php-cs-fixer
RECTOR=php ./tools/bin/rector
PHP_STAN=php ./vendor/bin/phpstan
CONSOLE=bin/console
COMPOSER=composer
PHPUNIT=php ./vendor/bin/phpunit
.DEFAULT_GOAL := help
.PHONY: help phpcsfix fixtures
help:
@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/'
lint: ## Lint the code
$(SYMFONY_CLI) console lint:yaml config --parse-tags
$(SYMFONY_CLI) console lint:twig templates --env=prod
$(SYMFONY_CLI) console lint:xliff translations
$(SYMFONY_CLI) console lint:container --no-debug
validate: lint phpstan rectify ## Validate the code, check composer.json and check security
$(SYMFONY_CLI) $(COMPOSER) validate --strict
$(SYMFONY_CLI) $(COMPOSER) audit
migrate: vendor ## Run doctrine migrations
$(SYMFONY_CLI) console doctrine:migration:migrate
phpcsfix: tools-vendor ## Run cs fixer
$(SYMFONY_CLI) $(PHP_CS_FIXER) fix
phpstan: vendor ## Run PHPStan
$(SYMFONY_CLI) $(PHP_STAN) analyse
fixtures: vendor ## Load fixtures test env
$(SYMFONY_CLI) console doctrine:fixtures:load --env=test --no-interaction
test: vendor bootstrap-tests fixtures ## Run tests
$(SYMFONY_CLI) $(PHPUNIT)
bootstrap-tests: ## Bootstrap tests
$(SYMFONY_CLI) console d:d:d --env=test --force --if-exists
$(SYMFONY_CLI) console d:d:c --env=test
$(SYMFONY_CLI) console d:m:m --env=test --no-interaction
rectify: vendor ## Run Rector
$(SYMFONY_CLI) $(RECTOR) process
rector: vendor ## Run Rector with dry run
$(SYMFONY_CLI) $(RECTOR) process --dry-run
# Rules from files
tools/php-cs-fixer/vendor/composer/installed.php: composer.lock
$(SYMFONY_CLI) $(COMPOSER) install --working-dir=./tools/php-cs-fixer
tools-vendor: tools/php-cs-fixer/vendor/composer/installed.php
vendor/composer/installed.php: composer.lock
$(SYMFONY_CLI) $(COMPOSER) install
vendor: vendor/composer/installed.php
aggregate-news:
$(SYMFONY_CLI) console app:aggregate-news
aggregate-events:
$(SYMFONY_CLI) console app:aggregate-events
aggregate-jobs:
$(SYMFONY_CLI) console app:job-provider:retrieve
schedule:
$(SYMFONY_CLI) console schedule:list
install: vendor assets
deploy: ## Deploy
ansible-playbook --vault-password-file=.ansible/.vault_pass .ansible/deploy.yml -i .ansible/inventory.yml
decrypt-vault: ## Decrypt Ansible vault
ansible-vault decrypt .ansible/vault.yml --vault-password-file .ansible/.vault_pass
encrypt-vault: ## Encrypt Ansible vault
ansible-vault encrypt .ansible/vault.yml --vault-password-file .ansible/.vault_pass