Aug 26, 2020
0
Level 14
Laravel Envoy run a command for each task
So as what the title have said..
examples..
@task('deploy_staging')
cd {{ $project_directory }}
git pull
@endtask
@task('deploy_project')
cd {{ $project_directory }}
git pull
@endtask
@task('clear_all_types_of_cache')
cd {{ $project_directory }}
php artisan cache:clear
php artisan view:clear
php artisan route:clear
php artisan clear
@endtask
@task('migrate_database')
cd {{ $project_directory }}
php artisan migrate --force
@endtask
you get the idea..
what I wanted is to move the command cd {{ $project_directory }} so the task commands are clean and concise, migrate database task should not care how to cd into project directory..
don't limit my question to the Change Directory Command, this could be usefull on some other commands also.
Please or to participate in this conversation.