-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile
65 lines (51 loc) · 2.16 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
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
.PHONY: install
install:
bin/console --env=prod cache:clear
bin/console --env=prod slub:install
.PHONY: migrate
migrate:
bin/console --env=prod cache:clear
bin/console --env=prod doctrine:migrations:migrate --no-interaction
.PHONY: install-test
install-test:
bin/console --env=test cache:clear
bin/console --env=test slub:install -vvv
.PHONY: check
check:
bin/console cache:clear --env=test
vendor/bin/behat -f progress
vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml
# vendor/bin/phpstan analyse --level max src tests
vendor/bin/php-cs-fixer fix --diff --dry-run --config=.php_cs.php --using-cache=no
.PHONY: fixcs export PHP_CS_FIXER_IGNORE_ENV=1
fixcs:
PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --diff --config=.php_cs.php --using-cache=no
.PHONY: tunnel
tunnel:
ngrok http slub.test:80
open https://api.slack.com/apps/AGAJXNKPG/event-subscriptions?
.PHONY: log-prod
log-prod:
heroku logs --tail -a slub-akeneo
.PHONY: log-staging
log-staging:
heroku logs --tail -a slub-test
.PHONY: deploy-staging
deploy-staging:
git push heroku-staging $(BRANCH):master --force
.PHONY: log-staging
od-prod: # Open dashboard production
open https://dashboard.heroku.com/apps/slub-akeneo
.PHONY: od-staging
od-staging: # Open dashboard staging
open https://dashboard.heroku.com/apps/slub-test
.PHONY: status-check-failure
status-check-failure: # Create a status check failure for a spectif sha given in parameter
curl -X POST -H "Authorization: token $(GITHUB_TOKEN)" https://api.github.com/repos/$(REPO)/statuses/$(SHA) -d '{"context": "status-check", "description": "status check failure", "state": "failure", "target_url": "https://google.com"}'
.PHONY: status-check-success
status-check-success: # Create a status check failure for a spectif sha given in parameter
curl -X POST -H "Authorization: token $(GITHUB_TOKEN)" https://api.github.com/repos/$(REPO)/statuses/$(SHA) -d '{"context": "status-check", "description": "status check success", "state": "success", "target_url": "https://google.com"}'
.PHONY: send-reminders
send-reminders:
heroku run --app slub-test bin/console slub:send-reminders