Skip to content

Instantly share code, notes, and snippets.

@vincentmoulene
Last active May 29, 2019 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vincentmoulene/f43969a1e95497d27694147075b5e3ec to your computer and use it in GitHub Desktop.
Save vincentmoulene/f43969a1e95497d27694147075b5e3ec to your computer and use it in GitHub Desktop.
Drupal 8 cleanup script
drupalclean() {  
echo "🌪  💩  Running Drupal Cleaning after git pull/merge"
  ./../vendor/bin/drupal update:execute -y
  ./../vendor/bin/drush cr
  # Sometimes Drupal 8.4.x import configs in wrong orders.
  # So we repeat the config-import max. 3 times on successives fails.
  n=0
  until [ $n -ge 3 ]; do
    ./../vendor/bin/drush cim -y
    n=$((n + 1))
  done
  ./../vendor/bin/drupal update:execute -y
  ./../vendor/bin/drupal upe -y
  ./../vendor/bin/drush cr
  notif Successful cleanup for this Drupal project!!!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment