-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
50 lines (34 loc) · 1.72 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
# Makefile Project
.PHONY: help
.DEFAULT_GOAL := help
#------------------------------------------------------------------------------------------------
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
#------------------------------------------------------------------------------------------------
install: ## Installs all prod dependencies
composer install --no-dev
dev: ## Installs all dev dependencies
composer install
#------------------------------------------------------------------------------------------------
csfix: ## Starts the PHP CS Fixer
PHP_CS_FIXER_IGNORE_ENV=1 php ./vendor/bin/php-cs-fixer fix --config=./.php_cs.php --dry-run
stan: ## Starts the PHPStan Analyser
@php ./vendor/bin/phpstan analyse -c ./.phpstan.neon
phpunit: ## Runs all tests
@php ./vendor/bin/phpunit --configuration=./phpunit.xml -v
#------------------------------------------------------------------------------------------------
pr: ## Runs and prepares everything for a pull request
PHP_CS_FIXER_IGNORE_ENV=1 php ./vendor/bin/php-cs-fixer fix --config=./.php_cs.php
@make phpunit -B
@make stan -B
#------------------------------------------------------------------------------------------------
build: ## Builds SVRUNIT and creates svrunit.phar
@make install -B
@echo "===================================================================="
@echo "verifying if phar files can be created....phar.readonly has to be OFF"
@php -i | grep phar.readonly
@php -i | grep "Loaded Configuration"
@cd scripts && php build.php
release: ## Create a ZIP file in the build folder
cd build && zip svrunit.zip svrunit.phar
cd build && rm -rf svrunit.phar