Skip to content

Commit

Permalink
Issue #6: Fix site install root option.
Browse files Browse the repository at this point in the history
  • Loading branch information
ademarco committed Jan 4, 2018
1 parent 06aa194 commit ff7fe88
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion config/runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ runner:

drupal:
core: "8"
root: "./build"
root: "build"
base-url: "http://127.0.0.1:8888"
site:
name: "Site name"
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/DrupalCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public function siteInstall(array $options = [
{
return $this->taskExec($this->getBin('drush'))
->option('-y')
->rawArg("--root=$(pwd)/".$options['root'])
->options([
'root' => $options['root'],
'site-name' => $options['site-name'],
'site-mail' => $options['site-mail'],
'locale' => $options['site-locale'],
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
test1: ${drupal.root}
test2: ${drupal.core}
expected: >
test1: ./build
test1: build
test2: 8
- command: setup:behat
Expand Down
26 changes: 13 additions & 13 deletions tests/fixtures/simulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
configuration: []
composer: ''
contains:
- "[Simulator] Running ./vendor/bin/drush -y --root=./build --site-name='Site name' [email protected] --locale=en [email protected] --account-name=admin --account-pass=admin --exclude=./build --db-url='mysql://root:[email protected]:3306/drupal' site-install standard"
- "[Simulator] Running ./vendor/bin/drush -y --root=$(pwd)/build --site-name='Site name' [email protected] --locale=en [email protected] --account-name=admin --account-pass=admin --exclude=build --db-url='mysql://root:[email protected]:3306/drupal' site-install standard"

- command: 'drupal:site-install --site-name="Test site"'
configuration: []
composer: ''
contains:
- "[Simulator] Running ./vendor/bin/drush -y --root=./build --site-name='Test site' [email protected] --locale=en [email protected] --account-name=admin --account-pass=admin --exclude=./build --db-url='mysql://root:[email protected]:3306/drupal' site-install standard"
- "[Simulator] Running ./vendor/bin/drush -y --root=$(pwd)/build --site-name='Test site' [email protected] --locale=en [email protected] --account-name=admin --account-pass=admin --exclude=build --db-url='mysql://root:[email protected]:3306/drupal' site-install standard"

- command: 'drupal:site-install --site-mail="[email protected]" --site-profile=minimal'
configuration: []
Expand All @@ -20,29 +20,29 @@
- command: 'drupal:site-install'
configuration:
drupal:
root: './test'
root: 'test'
site:
profile: 'minimal'
composer: ''
contains:
- "./vendor/bin/drush -y --root=./test"
- "./vendor/bin/drush -y --root=$(pwd)/test"
- "site-install minimal"

- command: 'drupal:site-install --root="./overridden"'
- command: 'drupal:site-install --root="overridden"'
configuration:
drupal:
root: './test'
composer: ''
contains:
- "./vendor/bin/drush -y --root=./overridden"
- "./vendor/bin/drush -y --root=$(pwd)/overridden"

- command: 'drupal:site-install --root="./overridden"'
- command: 'drupal:site-install --root="overridden"'
configuration:
runner:
bin-dir: "./bin"
composer: ''
contains:
- "./bin/drush -y --root=./overridden"
- "./bin/drush -y --root=$(pwd)/overridden"

- command: 'changelog:generate'
configuration:
Expand Down Expand Up @@ -84,11 +84,11 @@
"type": "drupal-module"
}
contains:
- "symlink('.', './build/modules/custom/bar')"
- "symlink('.', 'build/modules/custom/bar')"
- "[Simulator] Running ./vendor/bin/run 'setup:behat'"
- "[Simulator] Running ./vendor/bin/run 'setup:phpunit'"
- "WriteConfiguration('./build/sites/default/drushrc.php'"
- "AppendConfiguration('./build/sites/default/default.settings.php'"
- "WriteConfiguration('build/sites/default/drushrc.php'"
- "AppendConfiguration('build/sites/default/default.settings.php'"

- command: 'drupal:component-scaffold'
configuration:
Expand All @@ -112,7 +112,7 @@
"type": "drupal-module"
}
contains:
- "symlink('.', './build/sites/all/modules/custom/bar')"
- "symlink('.', 'build/sites/all/modules/custom/bar')"

- command: 'drupal:component-scaffold'
configuration:
Expand All @@ -124,4 +124,4 @@
"type": "drupal-theme"
}
contains:
- "symlink('.', './build/sites/all/themes/custom/bar')"
- "symlink('.', 'build/sites/all/themes/custom/bar')"
4 changes: 2 additions & 2 deletions tests/fixtures/tasks/replace-config-tokens/task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
two:
three: ${drupal.core}
expected:
one: "./build"
one: "build"
two:
three: "8"

Expand All @@ -19,4 +19,4 @@
- source:
concat: "${drupal.core}/${drupal.root}"
expected:
concat: "8/./build"
concat: "8/build"

0 comments on commit ff7fe88

Please sign in to comment.