Fabrizio Vanzani

ecommerce development, magento and tech tips

Simple CLI deploy commands for M2

On small projects, when you don’t have a deploy system, these shell aliases are handy.

alias m2='bin/magento'
alias dep='m2 maint:en && git pull && composer install --no-dev && m2 setup:upgrade && rm -r generated/* && m2 setup:di:compile && rm -rf  var/view_preprocessed/*  pub/static/frontend/* && m2 setup:static-content:deploy it_IT en_US -a frontend -f && m2 ca:cl && m2 maint:dis &&  m2 setup:static-content:deploy it_IT en_US -a adminhtml -f'
alias assets='rm -rf  var/view_preprocessed/* pub/static/frontend/* && m2 setup:static-content:deploy it_IT -a frontend -f && m2 ca:cl '
alias dicompile='rm -r generated/* && m2 setup:di:compile && m2 ca:cl'

Change the theme languages for your specific project.


Posted

in

, ,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *