I inherited some release scripts that prepare and deploy a PHP webapp to around 20 servers. The scripts are written in shell and I personally find them somewhat cumbersome to maintain. That may have have to do with the way they are written but I'm looking to see if anyone has opinion or experience to corroborate the idea that I might seek to do it in a more robust language. It's common to have release scripts written in shell, but does it seem like it lends itself to clunkiness compared to using a language that's more easily read and has better error handling facilities? This scripts seek to:
- run unittests, report success or failure
- gather and 'compile' javascript and css
- upload static content to a CDN
- check out code and transfer it to multiple machines
- bounce remote webservers
- clean up old directories on webservers
- schedule cron jobs on remote machines
- Send dynamic summary emails to report success or issues
Is it just me or is this kind of involved to write and maintain in shell? I haven't really played with PHP as a command interpreter but I'm thinking of doing it in PHP to match the language of the project. Anyone have any caveats, recommendations or alternatives?