-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
38 lines (30 loc) · 2.11 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
.DEFAULT_GOAL := help
install: ## Setup EtoA via vagrant
./composer.phar install
vagrant up --provision
.PHONY: help eventhandler
update: ## Update EtoA via vagrant
./composer.phar install
vagrant up --provision
vagrant ssh -c "/var/www/etoa/bin/console database:migrate"
ci: ## Run continuous integration tasks (tests and code style fixes)
./vendor/bin/phpunit tests
./vendor/bin/php-cs-fixer fix src --rules=@PSR2,binary_operator_spaces,blank_line_before_return,function_typehint_space,no_empty_comment,no_empty_phpdoc,no_empty_statement,no_extra_consecutive_blank_lines,no_leading_import_slash,no_leading_namespace_whitespace,trailing_comma_in_multiline_array,space_after_semicolon,single_quote,return_type_declaration,no_unused_imports,declare_strict_types --allow-risky=yes
./vendor/bin/php-cs-fixer fix tests --rules=@PSR2,binary_operator_spaces,blank_line_before_return,function_typehint_space,no_empty_comment,no_empty_phpdoc,no_empty_statement,no_extra_consecutive_blank_lines,no_leading_import_slash,no_leading_namespace_whitespace,trailing_comma_in_multiline_array,space_after_semicolon,single_quote,return_type_declaration,no_unused_imports,declare_strict_types --allow-risky=yes
./vendor/bin/phpstan analyse src tests --level=5 --no-progress
deploy-update: ## Everything which needs to be run during deploy
./composer.phar install -o
bin/console database:migrate
eventhandler/bin/build.sh
@echo "Restart the event handler in the web-based admin tool."
eventhandler: ## Build the cpp eventhandler
cd /var/www/etoa/eventhandler && rm -f CMakeCache.txt && cmake . && make
sudo mkdir -p /etc/etoad
sudo mkdir -p /var/log/etoad
sudo mkdir -p /var/run/etoad
sudo chmod -R 777 /var/log/etoad
sudo chmod -R 777 /var/run/etoad
sudo cp /var/www/etoa/vagrant/roundx.conf /etc/etoad/roundx.conf
sudo su vagrant -c"/var/www/etoa/eventhandler/target/etoad roundx -k -d -c /vagrant/htdocs/config/eventhandler.conf -p /var/www/etoa/htdocs/tmp/eventhandler.pid"
help: ## Helping devs since 2016
@cat $(MAKEFILE_LIST) | grep -e "^[a-zA-Z_\-]*: *.*## *" | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'