forked from mollie/Shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
58 lines (40 loc) · 2.01 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
#
# Makefile
#
.PHONY: help
.DEFAULT_GOAL := help
PLUGIN_VERSION=`cat MollieShopware/plugin.xml | grep -oPm1 "(?<=<version>)[^<]+"`
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
# ------------------------------------------------------------------------------------------------------------
install: ## Installs all production dependencies
@composer install --no-dev
dev: ## Installs all dev dependencies
@composer install
clean: ## Cleans all dependencies
@rm -rf vendor
@rm -rf composer.lock
@rm -rf .reports | true
# ------------------------------------------------------------------------------------------------------------
test: ## Starts all Tests
@XDEBUG_MODE=coverage php vendor/bin/phpunit --configuration=phpunit.xml
csfix: ## Starts the PHP CS Fixer
@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
metrics: ## Starts the PHPMetrics Analyser
@php vendor/bin/phpmetrics --config=.phpmetrics.json
# ------------------------------------------------------------------------------------------------------------
pr: ## Prepares everything for a Pull Request
@php vendor/bin/php-cs-fixer fix --config=./.php_cs.php
@make test -B
@make stan -B
# ------------------------------------------------------------------------------------------------------------
pr: ## Tests, prepares and fixes everything for a pull request
@make test -B
@php vendor/bin/php-cs-fixer fix --config=./.php_cs.php
@make stan -B
# ------------------------------------------------------------------------------------------------------------
release: ## Creates a new ZIP package
@cd .. && rm -rf MollieShopware-v$(PLUGIN_VERSION).zip
@cd .. && zip -qq -r -0 MollieShopware-v$(PLUGIN_VERSION).zip MollieShopware/ -x '*.git*' '*.github' '*.reports*' '*/Tests*' '*/phpunit.xml' '*/phpstan.neon' '*/.phpmetrics.json' '*/.php_cs.php' '*/makefile' '*.DS_Store'