-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (52 loc) · 2.52 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
.PHONY: *
OPTS=
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
phpdesktop: ## build phpdesktop release
rm -rf build
wget https://github.com/cztomczak/phpdesktop/releases/download/chrome-v57.0-rc/phpdesktop-chrome-57.0-rc-php-7.1.3.zip
unzip phpdesktop-chrome-57.0-rc-php-7.1.3.zip
mv phpdesktop-chrome-57.0-rc-php-7.1.3 build
rm phpdesktop-chrome-57.0-rc-php-7.1.3.zip
cd build/www; rm -rf *
cd build; rm -rf php/*
cd build/php; wget https://windows.php.net/downloads/releases/latest/php-8.0-nts-Win32-vs16-x86-latest.zip
cd build/php; unzip php-8.0-nts-Win32-vs16-x86-latest.zip
cd build/php; rm php-8.0-nts-Win32-vs16-x86-latest.zip
git archive HEAD | (cd build/www; tar x)
cd build/www; mv config/phpdesktop/php.ini ../php
cd build/www; mv config/phpdesktop/settings.json ../
cd build/www; mv .env.prod .env
cd build/www; APP_ENV=prod composer install --optimize-autoloader --no-dev --prefer-dist --no-plugins --no-scripts --no-progress
cd build/www; APP_ENV=prod php bin/console cache:clear -q
cd build/www; APP_ENV=prod php bin/console assets:install public -q
cd build/www; APP_ENV=prod php bin/console doctrine:database:create -q
cd build/www; APP_ENV=prod php bin/console doctrine:schema:create -q
cd build/www; yarn install
cd build/www; yarn run build
cd build/www; rm -rf assets node_modules
serve-web: ## start dev webserver
symfony local:server:start --no-tls
check-cs: ## check coding standards
vendor/bin/phpcs -n
fix-cs: ## auto-fix coding standards
vendor/bin/phpcbf -n
db-create: ## creates a fresh database
php bin/console vdo:initialize-application -f
feature-tests: ## executing behat tests
APP_ENV=test php bin/console vdo:initialize-application -f
APP_ENV=test vendor/bin/behat -f progress
static-analysis: ## runs static analysis
vendor/bin/phpstan analyse -c phpstan.neon
phpunit: ## run phpunit
vendor/bin/phpunit
lint-php: ## linting php files
if find src -name "*.php" -exec php -l {} \; | grep -v "No syntax errors detected"; then exit 1; fi
if find tests -name "*.php" -exec php -l {} \; | grep -v "No syntax errors detected"; then exit 1; fi
lint-js: ## execute eslint to lint js files
./node_modules/.bin/eslint assets
lint-doctrine: ## linting doctrine scheme
php bin/console doctrine:schema:validate --skip-sync
lint-gherkin: ## linting gherkin feature files
./vendor/bin/gherkinlint lint features/
build: lint-php check-cs static-analysis phpunit lint-doctrine lint-gherkin lint-js feature-tests