125 lines
3.2 KiB
Makefile
125 lines
3.2 KiB
Makefile
# Makefile for {{EXTENSION_NAME}} TYPO3 Extension
|
|
# Auto-generated by ddev setup
|
|
|
|
.PHONY: help
|
|
help: ## Show available targets
|
|
@awk 'BEGIN{FS=":.*##";print "\nUsage: make <target>\n"} /^[a-zA-Z0-9_.-]+:.*##/ {printf " %-22s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
|
|
|
|
# ===================================
|
|
# DDEV Environment Commands
|
|
# ===================================
|
|
|
|
.PHONY: up
|
|
up: start setup ## Complete startup (start DDEV + run setup) - ONE COMMAND TO RULE THEM ALL
|
|
|
|
.PHONY: start
|
|
start: ## Start DDEV environment
|
|
ddev start
|
|
|
|
.PHONY: stop
|
|
stop: ## Stop DDEV environment
|
|
ddev stop
|
|
|
|
.PHONY: setup
|
|
setup: ## Complete setup (install all TYPO3 versions)
|
|
@ddev describe >/dev/null 2>&1 || ddev start
|
|
ddev install-all
|
|
|
|
.PHONY: install-v12
|
|
install-v12: ## Install TYPO3 v12.4 LTS with extension
|
|
ddev install-v12
|
|
|
|
.PHONY: install-v13
|
|
install-v13: ## Install TYPO3 v13.0 LTS with extension
|
|
ddev install-v13
|
|
|
|
.PHONY: install-all
|
|
install-all: ## Install all TYPO3 versions
|
|
ddev install-all
|
|
|
|
.PHONY: ddev-restart
|
|
ddev-restart: ## Restart DDEV containers
|
|
ddev restart
|
|
|
|
.PHONY: ssh
|
|
ssh: ## SSH into DDEV web container
|
|
ddev ssh
|
|
|
|
# ===================================
|
|
# Composer & Quality Commands
|
|
# ===================================
|
|
|
|
.PHONY: install
|
|
install: ## Install composer dependencies
|
|
composer install
|
|
|
|
.PHONY: lint
|
|
lint: ## Run all linters (PHP syntax + PHPStan + code style)
|
|
@echo "==> Running PHP lint..."
|
|
composer ci:test:php:lint || composer lint
|
|
@echo "==> Running PHPStan..."
|
|
composer phpstan || composer ci:phpstan || echo "⚠️ PHPStan not configured"
|
|
@echo "==> Running code style check..."
|
|
composer ci:test:php:cgl || composer cs:check || echo "⚠️ Code style check not configured"
|
|
@echo "✅ All linters passed"
|
|
|
|
.PHONY: format
|
|
format: ## Auto-fix code style issues (PSR-12)
|
|
composer code:fix || composer cs:fix
|
|
|
|
.PHONY: typecheck
|
|
typecheck: ## Run PHPStan static analysis
|
|
composer phpstan || composer ci:phpstan
|
|
|
|
.PHONY: test
|
|
test: ## Run all tests (unit + functional)
|
|
composer test
|
|
|
|
.PHONY: test-unit
|
|
test-unit: ## Run unit tests only
|
|
composer test:unit
|
|
|
|
.PHONY: test-functional
|
|
test-functional: ## Run functional tests
|
|
composer test:functional
|
|
|
|
.PHONY: test-coverage
|
|
test-coverage: ## Generate test coverage report
|
|
composer test:coverage
|
|
|
|
.PHONY: ci
|
|
ci: ## Run complete CI pipeline (pre-commit checks)
|
|
composer ci || composer ci:test
|
|
|
|
.PHONY: clean
|
|
clean: ## Clean temporary files and caches
|
|
rm -rf .php-cs-fixer.cache
|
|
rm -rf var/
|
|
rm -rf .Build/.cache
|
|
|
|
# ===================================
|
|
# Extension-Specific Commands
|
|
# (Customize based on your extension)
|
|
# ===================================
|
|
|
|
.PHONY: urls
|
|
urls: ## Show all access URLs
|
|
@echo ""
|
|
@echo "{{EXTENSION_NAME}} - Access URLs"
|
|
@echo "==============================="
|
|
@echo ""
|
|
@echo "TYPO3 v12.4 LTS:"
|
|
@echo " Frontend: https://v12.{{DDEV_PROJECT}}.ddev.site/"
|
|
@echo " Backend: https://v12.{{DDEV_PROJECT}}.ddev.site/typo3/"
|
|
@echo ""
|
|
@echo "TYPO3 v13.0 LTS:"
|
|
@echo " Frontend: https://v13.{{DDEV_PROJECT}}.ddev.site/"
|
|
@echo " Backend: https://v13.{{DDEV_PROJECT}}.ddev.site/typo3/"
|
|
@echo ""
|
|
@echo "Backend Credentials:"
|
|
@echo " Username: admin"
|
|
@echo " Password: Password:joh316"
|
|
@echo ""
|
|
|
|
.DEFAULT_GOAL := help
|