Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Execute all VM commands from repo root. #1362

Merged
merged 1 commit into from
Apr 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

**Implemented enhancements:**

- Fixes #1355: Make Drush alias for 'local' work in VM guest or host by default. [\#1356](https://github.com/acquia/blt/pull/1356)
- Support CDEs for config splits [\#1311](https://github.com/acquia/blt/issues/1311)
- Deploy can be run with uncommitted changes [\#1276](https://github.com/acquia/blt/issues/1276)
- Let phing recognize git environment variables [\#1249](https://github.com/acquia/blt/issues/1249)
Expand Down
3 changes: 3 additions & 0 deletions src/Robo/Commands/Tests/SecurityUpdatesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public function testsSecurityUpdates() {
$this->logger->notice($output);
$this->logger->notice('To disable security checks, set `disable-targets.tests.security-updates` to `false` in project.yml.');
}
else {
$this->say("<success>There are no outstanding security updates.</success>");
}
}

}
12 changes: 10 additions & 2 deletions src/Robo/Commands/Vm/VmCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ public function vm($options = ['no-boot' => FALSE]) {
public function nuke() {
$confirm = $this->confirm("This will destroy your VM, and delete all associated configuration. Continue?");
if ($confirm) {
$this->taskExec("vagrant destroy")->printOutput(TRUE)->run();
$this->taskExec("vagrant destroy")
->dir($this->getConfigValue('repo.root'))
->printOutput(TRUE)
->run();
$this->taskFilesystemStack()
->remove($this->projectDrupalVmConfigFile)
->remove($this->projectDrupalVmVagrantfile)
Expand Down Expand Up @@ -174,7 +177,10 @@ protected function boot() {
$confirm = $this->confirm("Do you want to boot Drupal VM?", TRUE);
if ($confirm) {
$this->say("In future, run `vagrant up` to boot the VM");
$this->taskExec("vagrant up")->printOutput(TRUE)->run();
$this->taskExec("vagrant up")
->dir($this->getConfigValue('repo.root'))
->printOutput(TRUE)
->run();
}
}

Expand All @@ -186,6 +192,7 @@ protected function boot() {
protected function requireDrupalVm() {
$this->say("Adding geerlingguy/drupal-vm:{$this->drupalVmVersionConstraint} to composer.json's require-dev array.");
$result = $this->taskExec("composer require --dev geerlingguy/drupal-vm:{$this->drupalVmVersionConstraint}")
->dir($this->getConfigValue('repo.root'))
->interactive()
->printOutput(TRUE)
->run();
Expand All @@ -196,6 +203,7 @@ protected function requireDrupalVm() {
$confirm = $this->confirm("Should BLT attempt to update all of your Composer packages in order to find a compatible version?");
if ($confirm) {
$result = $this->taskExec("composer require --dev geerlingguy/drupal-vm:{$this->drupalVmVersionConstraint} --no-update && composer update")
->dir($this->getConfigValue('repo.root'))
->interactive()
->printOutput(TRUE)
->run();
Expand Down