# Start by fetching production's database.
drush syncdb @prod @local
# Make sure your main branch is up to date:
git checkout master
git pull --rebase
Given that:
- Your repository has Drupal core at /docroot.
- You keep patches at /patches and a reference at /patches/README.md.
# Create a new branch for this upgrade so it can be peer reviewed:
git checkout -b ticket-number-upgrade-core-7-xx
# Bring on the new core version.
# Drush takes care of removing core files that are not present
drush up drupal
# If core was patched, review if patches were committed and update
# docroot/../patches/README.md accordingly (assuming that you keep track of
# patches at docroot/../patches/).
# Update the database and look for errors or warnings.
(cd docroot && drush rr -v && drush updatedb -v -y && drush fra -y -v)
# Run automated tests (if available) and test manually.
# If everything worked as expected. Commit and push:
git add -A .
git commit -m "Upgrade core to 7.xx"
git push -u origin ticket-number-upgrade-core-7-xx
# Ask someone else to test it before merging it.
Given that:
- Contrib modules are located at /docroot/sites/all/modules/contrib.
- Patches are kept at /patches and a reference at /patches/README.md.
Check the release notes of every version ahead of the current version to see if there are any blockers. If there are no blockers, proceed to the upgrade:
# Create a branch for this upgrade
git checkout -b ticket-number-upgrade-modulename-to-XX
# Download the new version
(cd docroot && drush dl modulename)
# Check docrot/patches to see if this module was patched and, if so, check whether
# patches are committed already or if you need to patch the new version as well.
# Update the database and look for errors or warnings.
(cd docroot && drush rr -v && drush updatedb -v -y && drush fra -y -v)
# Run tests and check manually the site.
# Commit and push your changes.
git add -A .
git commit -m "Ticketnumber Upgrade module modulename to XX"
git push -u origin ticket-number-upgrade-modulename-to-XX