Website/app/Makefile

69 lines
2.5 KiB
Makefile
Raw Normal View History

2024-02-19 21:23:38 +00:00
##|——[ General ]—————————————————————————————————————————————————————————————————————————|
help: ## Shops available commands
@bin/make/help.sh
2024-02-04 02:46:53 +00:00
2024-02-19 21:23:38 +00:00
check: ## Checks whether requirements are met
@bin/make/check.sh
2024-02-04 02:46:53 +00:00
2024-02-19 21:23:38 +00:00
##|——[ 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'
2024-02-04 02:46:53 +00:00
2024-02-19 21:23:38 +00:00
down: ## Stops the Local Instance
2024-02-04 02:46:53 +00:00
ifneq (,$(wildcard ./npm-watch.pid))
@printf "${RED}Killing ${YELLOW}Encore${CLEAR}!\n"
kill $$(cat ./npm-watch.pid)
@rm -rf ./npm-watch.pid
endif
2024-02-19 21:23:38 +00:00
@symfony local:server:stop
@docker compose down
2024-02-04 02:46:53 +00:00
fresh: ## Starts a Fresh Local Instance
2024-02-19 21:23:38 +00:00
@make down -s
2024-02-29 21:49:41 +00:00
@symfony composer install
@npm i
@make up -s
@make db-demo -s
2024-02-04 02:46:53 +00:00
2024-02-19 21:23:38 +00:00
##|——[ Code Quality ]————————————————————————————————————————————————————————————————————|
test: ## Runs all Unittests
vendor/bin/phpunit
2024-02-04 02:46:53 +00:00
analyze: ## Runs Static Code Analysis
vendor/bin/phpstan analyze
2024-02-19 21:23:38 +00:00
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
2024-02-04 02:46:53 +00:00
2024-02-19 21:23:38 +00:00
##|——[ Data ]————————————————————————————————————————————————————————————————————————————|
2024-02-04 02:46:53 +00:00
db-demo: ## Writes the Demo Data to the Local Instance
2024-02-29 21:49:41 +00:00
symfony console doctrine:database:drop --if-exists --force
symfony console doctrine:database:create
symfony console doctrine:schema:update --force
2024-02-04 02:46:53 +00:00
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
2024-02-29 21:49:41 +00:00
symfony console doctrine:migration:migrate