You are hereUpdate: site management using proto-sites

Update: site management using proto-sites


By danep - Posted on 20 August 2010

Hot on the heels of my previous post on site management using proto-sites, Greg Anderson pointed out that you can lock modules in the latest release of Drush, allowing you to maintain "hacked" and stock modules side-by-side on your proto-sites. Moreover, he wrote a patch to the Hacked! that allows you to automatically lock hacked modules. This means that you can run one command on a proto-site with both hacked and stock modules that will quickly update all of the stock modules while holding back the hacked modules so they can be updated via vendor branching or whatever other method you prefer - all without any special effort on your part!

If I have to hack a module, I move it out of the proto-site directory and into a SVN repository where it can be vendor-branched, and then place a symlink to the module in the proto-site directory. This way I can re-use hacked modules on many different proto-sites.

Here is the modified script that will update module code on a proto-site (holding back hacked modules) and then run update.php on all dependent sites:
drush-update-all
#!/usr/bin/env bash
drush up --lock-modified
installpath[1]=/var/www/drupal/research
installpath[2]=/var/www/drupal/personal
installpath[3]=/home/client1/research
installpath[4]=/home/client2/research
installpath[5]=/home/client3/personal
installpath[6]=/home/client4/personal
for index in 1 2 3 4 5 6
do
filepath=${installpath[index]}
printf "Updating %s\n" "$filepath"
cd $filepath
drush updatedb
drush pm-refresh
done

Tags
randomness