From 0bd3ae111ae7eac823d350897147a27e3ea4162b Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Wed, 17 Aug 2016 09:55:42 -0400 Subject: [PATCH 1/3] Simplifying drupal vm aliases. --- phing/tasks/blt.xml | 4 +++- phing/tasks/vm.xml | 16 +++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/phing/tasks/blt.xml b/phing/tasks/blt.xml index f98742037..5fd6f1904 100644 --- a/phing/tasks/blt.xml +++ b/phing/tasks/blt.xml @@ -2,7 +2,7 @@ Updating composer dependencies, this make take a while... - + @@ -37,6 +37,7 @@ + Merging BLT's composer.json template with your project's composer.json. This MAY overwrite some existing values. @@ -47,6 +48,7 @@ + Merging BLT's project.yml template with your project's project.yml This WILL NOT overwrite existing values. diff --git a/phing/tasks/vm.xml b/phing/tasks/vm.xml index e4949f191..902c984eb 100644 --- a/phing/tasks/vm.xml +++ b/phing/tasks/vm.xml @@ -3,13 +3,19 @@ BLT support for Drupal VM is EXPERIMENTAL. Not all BLT features currently work with Drupal VM. - + Creating a drush alias for the new VM. + + + + + - + - + Adding geerlingguy/drupal-vm to composer dev dependencies. + @@ -27,8 +33,8 @@ https://github.com/geerlingguy/drupal-vm#quick-start-guide To boot the VM, run "vagrant up" from the project root. - To run drush commands against the VM, use the @${project.drush.aliases.local} alias. - You may pin yourself to this alias using "drush use @${project.drush.aliases.local}" + To run drush commands against the VM, use the @${drush.aliases.local} alias. + You may pin yourself to this alias using "drush use @${drush.aliases.local}" From 55168ccfcdc1fcbf18f3f1631d8d028b5f95d769 Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Wed, 17 Aug 2016 10:01:11 -0400 Subject: [PATCH 2/3] Updating tests --- tests/phpunit/DrupalVmTest.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/DrupalVmTest.php b/tests/phpunit/DrupalVmTest.php index 822a71630..fd3e40df4 100644 --- a/tests/phpunit/DrupalVmTest.php +++ b/tests/phpunit/DrupalVmTest.php @@ -26,15 +26,18 @@ public function __construct() { public function testVmInit() { $this->assertFileExists($this->newProjectDir . '/Vagrantfile'); $this->assertFileExists($this->newProjectDir . '/box/config.yml'); - $this->assertFileExists($this->newProjectDir . '/drush/site-aliases/drupal-vm.aliases.drushrc.php'); $this->assertNotContains( '${project.machine_name}', file_get_contents($this->newProjectDir . '/box/config.yml') ); - $this->assertNotContains( - '${project.machine_name}', - file_get_contents($this->newProjectDir . '/drush/site-aliases/drupal-vm.aliases.drushrc.php') + $this->assertContains( + $this->config['project']['machine_name'] . '.local', + file_get_contents($this->newProjectDir . '/drush/site-aliases/aliases.drushrc.php') + ); + $this->assertContains( + $this->config['project']['machine_name'] . '.local', + file_get_contents($this->newProjectDir . '/project.yml') ); } From 67068173eb10f8e4e90c21f1dacf8b6bfabfd2fc Mon Sep 17 00:00:00 2001 From: Matthew Grasmick Date: Wed, 17 Aug 2016 11:11:33 -0400 Subject: [PATCH 3/3] More VM fixes. --- phing/tasks/properties.xml | 2 +- phing/tasks/vm.xml | 8 ++++++++ template/drush.wrapper | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/phing/tasks/properties.xml b/phing/tasks/properties.xml index 8fc4c2f21..0e8a2e359 100644 --- a/phing/tasks/properties.xml +++ b/phing/tasks/properties.xml @@ -32,7 +32,7 @@ Unsetting drush.root because a remote alias is being used. - + diff --git a/phing/tasks/vm.xml b/phing/tasks/vm.xml index 902c984eb..8bdd45a04 100644 --- a/phing/tasks/vm.xml +++ b/phing/tasks/vm.xml @@ -35,6 +35,14 @@ To boot the VM, run "vagrant up" from the project root. To run drush commands against the VM, use the @${drush.aliases.local} alias. You may pin yourself to this alias using "drush use @${drush.aliases.local}" + + + + + + The vagrant-hostsupdater plugin is not installed! + + diff --git a/template/drush.wrapper b/template/drush.wrapper index 1d5c71e19..113b38334 100755 --- a/template/drush.wrapper +++ b/template/drush.wrapper @@ -47,5 +47,5 @@ DOCROOT=$(${DIR}/vendor/bin/blt echo-property -Dproperty.name=drush.root -S -e) if [ -z "$DOCROOT" ]; then vendor/bin/drush.launcher --alias-path=${DIR}/drush/site-aliases "$@" else - vendor/bin/drush.launcher --alias-path=${DIR}/drush/site-aliases "$@" -r ${DIR}/docroot + vendor/bin/drush.launcher --alias-path=${DIR}/drush/site-aliases "$@" -r $DOCROOT fi