I would recommend you to use a Makefile The syntax's quite simple.
Makefile
command_name: command_1 command_2 ...
here is an example:
update_and_compile_prod: sudo git pull origin php artisan migrate sudo npm update sudo npm run prod
After you only need to call make update_and_compile_prod (make command_name), and it will run smoothly :)
make update_and_compile_prod
Also, you can add this command to the script list on your package.json and run it with npm.
You can also try to investigate if you can use a githook to trigger that action every time you pull
Thanks
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I would recommend you to use a
Makefile
The syntax's quite simple.
here is an example:
After you only need to call
make update_and_compile_prod
(make command_name), and it will run smoothly :)Also, you can add this command to the script list on your package.json and run it with npm.
You can also try to investigate if you can use a githook to trigger that action every time you pull
Thanks