From 281f408f826560edec05f1d6c238fe6b4693cf4e Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 27 Nov 2019 18:30:41 -0600 Subject: [PATCH 1/3] Remove the custom shell script drush launcher, since we add the project's vendor/bin/ directory to the PATH already. --- .../vagrant/provisioning/drupal8-skeleton.yml | 1 - .../provisioning/roles/drush/bin/drush | 28 ------------------- .../provisioning/roles/drush/tasks/main.yml | 8 ------ 3 files changed, 37 deletions(-) delete mode 100755 conf/vagrant/provisioning/roles/drush/bin/drush delete mode 100644 conf/vagrant/provisioning/roles/drush/tasks/main.yml diff --git a/conf/vagrant/provisioning/drupal8-skeleton.yml b/conf/vagrant/provisioning/drupal8-skeleton.yml index ecb7784..1875fc3 100644 --- a/conf/vagrant/provisioning/drupal8-skeleton.yml +++ b/conf/vagrant/provisioning/drupal8-skeleton.yml @@ -13,7 +13,6 @@ - { role: vhost } - { role: https } - { role: solr } - - { role: drush } - { role: drupal-check } - { role: gulp } - { role: elnebuloso.nvm, diff --git a/conf/vagrant/provisioning/roles/drush/bin/drush b/conf/vagrant/provisioning/roles/drush/bin/drush deleted file mode 100755 index c40e4d2..0000000 --- a/conf/vagrant/provisioning/roles/drush/bin/drush +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -# -# This script wraps drush. It allows you to transparently use a project-local -# drush and drushrc.php, if they are available, but falls back to the system -# drush. -# -# To use it, add a line like this to your ~/.profile: -# alias drush=/var/www/PROJECT_NAME.local/bin/drush -# -# Then, try `drush status` from your home directory, and again from the project -# root. - -THE_DRUSH="/usr/bin/drush" -DRUSH_FLAGS="" - -REPO=$(git rev-parse --show-toplevel 2> /dev/null) - -if [ $REPO ] && [ -e $REPO/vendor/bin/drush ]; then - THE_DRUSH="$REPO/vendor/bin/drush" -fi - -if [ $REPO ] && [ -e $REPO/conf/drushrc.php ]; then - DRUSH_FLAGS="-c $REPO/conf/drushrc.php" -elif [ $REPO ] && [ -e $REPO/drush/drushrc.php ]; then - DRUSH_FLAGS="-c $REPO/drush/drushrc.php" -fi - -$THE_DRUSH $DRUSH_FLAGS "$@" diff --git a/conf/vagrant/provisioning/roles/drush/tasks/main.yml b/conf/vagrant/provisioning/roles/drush/tasks/main.yml deleted file mode 100644 index 74f4b60..0000000 --- a/conf/vagrant/provisioning/roles/drush/tasks/main.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Drush wrapper | Copy drush wrapper - copy: src=../bin dest=/home/vagrant mode=u+rwx - tags: drush - -- name: Drush wrapper | Configure drush wrapper - lineinfile: dest=/home/vagrant/.profile state=present line='export PATH="$PATH:$HOME/bin"' - tags: drush From 1800af363cf541b4da736501bf0fd01c11799233 Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 27 Nov 2019 18:35:32 -0600 Subject: [PATCH 2/3] Still add the ~/bin to the $PATH, since the drupal-check installation relies on this too. --- conf/vagrant/provisioning/roles/common/tasks/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/conf/vagrant/provisioning/roles/common/tasks/main.yml b/conf/vagrant/provisioning/roles/common/tasks/main.yml index 48d1078..5900a24 100644 --- a/conf/vagrant/provisioning/roles/common/tasks/main.yml +++ b/conf/vagrant/provisioning/roles/common/tasks/main.yml @@ -54,10 +54,18 @@ when: provision_user.stat.exists tags: common +- name: Add the ~/bin to the path + lineinfile: dest=/home/vagrant/.profile state=present line='export PATH="$PATH:$HOME/bin"' + tags: drush + - name: Add the project's vendor/bin to the path lineinfile: dest=/home/vagrant/.profile state=present line='export PATH="$PATH:/var/www/{{ hostname }}/vendor/bin"' tags: common +- name: Add the ~/bin to the zsh path + lineinfile: dest=/home/vagrant/.zshrc state=present create=yes line='export PATH="$PATH:$HOME/bin"' + tags: drush + - name: Add $HOME/bin and the project's vendor/bin to the zsh path lineinfile: dest=/home/vagrant/.zshrc state=present create=yes line='export PATH="$PATH:$REPO/vendor/bin:$HOME/bin:/var/www/{{ hostname }}/vendor/bin"' tags: common From 642e1bceb14f99061c0ac8b8bf1912009f465818 Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 27 Nov 2019 18:38:47 -0600 Subject: [PATCH 3/3] Update the README. --- CHANGELOG.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 503c451..9994d78 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Change Log +## UNRELEASED + +### Changed + +* Removed the custom drush wrapper in ~/bin. Drush 9 handles this itself. + +### Updating from 2.5 + +* This update does **not** require destroying your current vagrant box. +* As a developer, you may want to: + 1. From your Vagrant box, `rm ~/bin/drush` + 2. Log out of your vagrant and then back in before continuing to work + ## 2.5.0 - November 18, 2019 ### Changed