Created
July 13, 2016 10:29
-
-
Save akkonrad/a0fac809c1d20d1d3177d8a42eded9bf to your computer and use it in GitHub Desktop.
Update drupal sites and create git flow release.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
BASE='/var/www/' | |
DRUPAL_PROJECTS=('drupalProject1' 'drupalProject2' 'drupalProject3' 'drupalProject4') | |
RELEASE_NAME="release-$(date +'%Y-%m-%d')" | |
echo $RELEASE_NAME | |
for DRUPAL_SITE in ${DRUPAL_PROJECTS[*]} | |
do | |
########################## | |
echo "##########################################################" | |
echo "UPDATING SITE: $BASE$DRUPAL_SITE" | |
echo "##########################################################" | |
git stash save $RELEASE_NAME | |
git flow release start $RELEASE_NAME | |
cd $BASE$DRUPAL_SITE | |
echo "Update drupal core" | |
echo "drush up drupal -y" | |
drush up drupal -y | |
echo "Update contrib modules: only secure updates" | |
echo "drush up --security-only -y" | |
drush up --security-only -y | |
drush updb -y | |
# Commit changes. | |
git add . | |
git commit -m "$RELEASE_NAME" | |
########################## | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment