68 lines
No EOL
2.5 KiB
Makefile
68 lines
No EOL
2.5 KiB
Makefile
##|——[ General ]—————————————————————————————————————————————————————————————————————————|
|
|
help: ## Shops available commands
|
|
@bin/make/help.sh
|
|
|
|
check: ## Checks whether requirements are met
|
|
@bin/make/check.sh
|
|
|
|
|
|
##|——[ Local Server ]————————————————————————————————————————————————————————————————————|
|
|
up: ## Starts the Local Instance
|
|
@make down -s
|
|
@make check -s
|
|
@docker compose up -d
|
|
@symfony local:server:start -d --no-tls
|
|
@bash -c '$$(npm run watch >> var/log/encore.log)& echo $$! > ./npm-watch.pid'
|
|
|
|
down: ## Stops the Local Instance
|
|
ifneq (,$(wildcard ./npm-watch.pid))
|
|
@printf "${RED}Killing ${YELLOW}Encore${CLEAR}!\n"
|
|
kill $$(cat ./npm-watch.pid)
|
|
@rm -rf ./npm-watch.pid
|
|
endif
|
|
@symfony local:server:stop
|
|
@docker compose down
|
|
|
|
fresh: ## Starts a Fresh Local Instance
|
|
@make down -s
|
|
@symfony composer install -s
|
|
@npm i .s
|
|
@make up .s
|
|
@make db-demo s
|
|
|
|
|
|
##|——[ Code Quality ]————————————————————————————————————————————————————————————————————|
|
|
test: ## Runs all Unittests
|
|
vendor/bin/phpunit
|
|
|
|
analyze: ## Runs Static Code Analysis
|
|
vendor/bin/phpstan analyze
|
|
|
|
lint: ## Runs the Linters
|
|
@make lint-php -s
|
|
@make lint-ts -s
|
|
@make lint-twig -s
|
|
|
|
lint-php: ## Runs the PHP Linting
|
|
vendor/bin/php-cs-fixer fix --allow-risky=yes
|
|
|
|
lint-ts: ## Runs the Typescript Linting
|
|
npm run lint:fix
|
|
|
|
lint-twig: ## Runs Twig Linting
|
|
vendor/bin/twig-cs-fixer lint --fix
|
|
php bin/console lint:twig
|
|
|
|
##|——[ Data ]————————————————————————————————————————————————————————————————————————————|
|
|
db-demo: ## Writes the Demo Data to the Local Instance
|
|
symofny console doctrine:database:drop --if-exists --force
|
|
symofny console doctrine:database:create
|
|
symofny console doctrine:schema:update --force
|
|
symfony console doctrine:fixtures:load -n
|
|
symfony console cache:clear
|
|
|
|
db-migration-gen: ## Generates a Migration
|
|
symfony console doctrine:migration:diff
|
|
|
|
db-migration-do: ## Does the Migration
|
|
symfony console doctrine:migration:migrate
|