Freeset’s Deployment Script
At Freeset, we have two CMS Made Simple instances set up. One for development and another one for live environment. We do all our stuff on dev and then run the following shell script to deploy the latest changes from dev to live. This is a great example of “Do the Simplest Thing that could Possibly Work“.
#!/bin/bash mysqldump --no-create-db --add-drop-table --skip-add-locks --skip-disable-keys --quick -u{db.user.name} -p{db.password} {live.db.name} --tables cms_module_blogs_commentprops cms_module_blogs_comments cms_module_blogs_comments_seq | mysql -u{db.user.name} -p{db.password} {dev.db.name} && mysqldump --opt -u{db.user.name} -p{db.password} {dev.db.name} | mysql -u{db.user.name} -p{db.password} {live.db.name} && rsync -rpl --delete --exclude=config.php {dev.deployment.dir}/ {live.deployment.dir}/ |