Skip to content

Commit b29ee13

Browse files
committed
Case 27790; Allowing root directory to be passed to site:compose in chain.
1 parent bc1b3c4 commit b29ee13

File tree

6 files changed

+22
-20
lines changed

6 files changed

+22
-20
lines changed

chain/chain-site-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Usage: drupal site:build --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
1+
# Usage: drupal site:build --placeholder="name:subscriptions" --placeholder="root:/vagrant/repos"
22
command:
33
name: site:build
44
description: 'Builds a new site.'
@@ -14,4 +14,4 @@ commands:
1414
options:
1515
placeholder:
1616
- 'name:%{{name}}'
17-
- 'root:%{{root|\/vagrant\/repos}}'
17+
- 'root:%{{root|/vagrant/repos}}'

chain/chain-site-compile.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Usage: drupal site:compile --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
1+
# Usage: drupal site:compile --placeholder="name:subscriptions" --placeholder="root:/vagrant/repos"
22
command:
33
name: site:compile
44
description: 'Compiles the source, downloading and extracting the packages.'
@@ -7,11 +7,13 @@ commands:
77
- command: site:compose
88
arguments:
99
name: '%{{name}}'
10+
options:
11+
destination-directory: '%{{root|/vagrant/repos}}/%{{name}}'
1012
# Run npm
1113
- command: exec
1214
arguments:
13-
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; find . -type d \( -name node_modules -o -name contrib -o -path ./core \) -prune -o -name package.json -execdir sh -c "npm install" \;'
15+
bin: 'cd %{{root|/vagrant/repos}}/%{{name}}/web; find . -type d \( -name node_modules -o -name contrib -o -path ./core \) -prune -o -name package.json -execdir sh -c "npm install" \;'
1416
# Run grunt
1517
- command: exec
1618
arguments:
17-
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; find . -type d \( -name node_modules -o -name contrib -o -path ./core \) -prune -o -name Gruntfile.js -execdir sh -c "grunt" \;'
19+
bin: 'cd %{{root|/vagrant/repos}}/%{{name}}/web; find . -type d \( -name node_modules -o -name contrib -o -path ./core \) -prune -o -name Gruntfile.js -execdir sh -c "grunt" \;'

chain/chain-site-construct.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# Usage: drupal site:construct --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
1+
# Usage: drupal site:construct --placeholder="name:subscriptions" --placeholder="root:/vagrant/repos"
22
command:
33
name: site:construct
44
description: 'Sets the site up based on current configuration and database.'
55
commands:
66
# Clear cache
77
- command: exec
88
arguments:
9-
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush cr;'
9+
bin: 'cd %{{root|/vagrant/repos}}/%{{name}}/web; drush cr;'
1010
# Set default drush alias
1111
- command: exec
1212
arguments:
13-
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush site-set @site;'
13+
bin: 'cd %{{root|/vagrant/repos}}/%{{name}}/web; drush site-set @site;'
1414
# Run db updates
1515
- command: exec
1616
arguments:
17-
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush updb -y;'
17+
bin: 'cd %{{root|/vagrant/repos}}/%{{name}}/web; drush updb -y;'
1818
# Import configuration twice to fix a problem with config import when new modules are added to core.extensions.yml
1919
- command: exec
2020
arguments:
21-
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush cim -y; drush cim -y'
21+
bin: 'cd %{{root|/vagrant/repos}}/%{{name}}/web; drush cim -y; drush cim -y'
2222
# Clear cache
2323
- command: exec
2424
arguments:
25-
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush cr;'
25+
bin: 'cd %{{root|/vagrant/repos}}/%{{name}}/web; drush cr;'

chain/chain-site-rebuild-prod.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Usage: drupal site:rebuild:prod --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
1+
# Usage: drupal site:rebuild:prod --placeholder="name:subscriptions" --placeholder="root:/vagrant/repos"
22
command:
33
name: site:rebuild:prod
44
description: 'Peforms necessary steps to build the site from a given source.'
@@ -8,10 +8,10 @@ commands:
88
options:
99
placeholder:
1010
- 'name:%{{name}}'
11-
- 'root:%{{root|\/vagrant\/repos}}'
11+
- 'root:%{{root|/vagrant/repos}}'
1212
# Build the site based on existing setup.
1313
- command: site:construct
1414
options:
1515
placeholder:
1616
- 'name:%{{name}}'
17-
- 'root:%{{root|\/vagrant\/repos}}'
17+
- 'root:%{{root|/vagrant/repos}}'

chain/chain-site-rebuild.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Usage: drupal site:rebuild --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
1+
# Usage: drupal site:rebuild --placeholder="name:subscriptions" --placeholder="root:/vagrant/repos"
22
command:
33
name: site:rebuild
44
description: 'Peforms necessary steps to build the site from a given source.'
@@ -8,7 +8,7 @@ commands:
88
options:
99
placeholder:
1010
- 'name:%{{name}}'
11-
- 'root:%{{root|\/vagrant\/repos}}'
11+
- 'root:%{{root|/vagrant/repos}}'
1212
# Generate the settings.
1313
- command: site:configure
1414
options:
@@ -23,4 +23,4 @@ commands:
2323
options:
2424
placeholder:
2525
- 'name:%{{name}}'
26-
- 'root:%{{root|\/vagrant\/repos}}'
26+
- 'root:%{{root|/vagrant/repos}}'

chain/chain-site-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Usage: drupal site:test --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos"
1+
# Usage: drupal site:test --placeholder="name:subscriptions" --placeholder="root:/vagrant/repos"
22
command:
33
name: site:test
44
description: 'Sets the test suites up and then runs them.'
@@ -14,8 +14,8 @@ commands:
1414
# Run Behat
1515
- command: exec
1616
arguments:
17-
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/tests; ./behat;'
17+
bin: 'cd %{{root|/vagrant/repos}}/%{{name}}/tests; ./behat;'
1818
# Run phpunit
1919
- command: exec
2020
arguments:
21-
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}; ./vendor/bin/phpunit;'
21+
bin: 'cd %{{root|/vagrant/repos}}/%{{name}}; ./vendor/bin/phpunit;'

0 commit comments

Comments
 (0)