Skip to content
  • SYMFONY = ez sfrun --
    EXEC_PHP = ez docker:exec engine --user=1000:1000 --
    COMPOSER = ez comprun  --
    
    ##
    ## Install project
    ## -----------------
    ##
    
    install: ## Install the hole project
    install: create init
    
    create: ## Create all ez the services
    create: /usr/local/bin/ez
    	ez create
    
    
    ##
    ## Update project
    ## -----------------
    ##
    
    init: ## Init the project
    init: composer-install ezmigrate cc cpc assets
    
    update-from-inte: ## Update from Intégration
    update-from-inte:
    	cd scripts/ && ./update-docker-from-integration.sh
    
    ##
    ## Quality code sniffer
    ## -----------------
    ##
    
    lint: ## Run lint check
    lint:
    	$(SYMFONY) lint:yaml project/ezplatform/app/config/
    	$(SYMFONY) lint:yaml project/ezplatform/app/Resources/translations/
    
    php-cs: ## Run php-cs-fixer
    php-cs: /usr/local/bin/ez
    	$(EXEC_PHP) 'project/ezplatform/vendor/bin/phpcs fix --diff --dry-run --config=project/ezplatform/.php_cs ezplatform/src'
    
    php-stan: ## Run phpstan
    php-stan:
    	$(EXEC_PHP) 'project/ezplatform/bin/phpstan analyse --level=6 project/ezplatform/src'
    
    ##
    ## DB Migration
    ## -----------------
    ##
    
    diff: ## Generate a new doctrine migration
    diff: ezplatform/vendor
    	$(SYMFONY) doctrine:migrations:diff --filter-expression='~^(?!ez|kaliop_migrations)~'
    
    migrate: ## Execute doctrine migration
    migrate: ezplatform/vendor
    	$(SYMFONY) doctrine:migrations:migrate -n
    
    ezmigrate: ## Execute kaliop ez migration
    ezmigrate:
    	$(SYMFONY) kaliop:migration:migrate -n
    
    ##
    ## Utils
    ## -----------------
    ##
    cc: ## Cache clear
    cc: ezplatform/vendor
    	$(SYMFONY) c:c --no-warmup
    
    cpc: ## Cache redis pool cache
    cpc:ezplatform/vendor
    	$(SYMFONY) c:p:c cache.redis
    
    assets: ## Intall assets
    assets: ezplatform/vendor
    	$(SYMFONY) assets:install web --symlink --relative --env=dev
    	$(SYMFONY) assetic:dump --env=dev
    
    watch: ## Assetic watch
    watch: ezplatform/vendor
    	$(SYMFONY) assetic:watch --env=dev
    
    composer-install: ## Composer install
    composer-install:
    	$(COMPOSER) 'install --no-interaction'
    
    ##
    ## Docker
    ## -----------------
    ##
    up: ## Docker Up all the services
    up: /usr/local/bin/ez
    	ez start
    
    down: ## Docker Stop all the services
    down:/usr/local/bin/ez
    	ez stop
    
    build: ## Docker build
    build: /usr/local/bin/ez
    	ez build
    
    update: ## Docker ps
    update: /usr/local/bin/ez
    	ez docker:update
    
    .DEFAULT_GOAL := help
    help:
    	@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
    .PHONY: help
    
    Edited by Romain Bonnal
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment