-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from dennisinteractive/proposal_console_chains
27689 Proposal for console command changes, removal of hardcoded values.
- Loading branch information
Showing
9 changed files
with
113 additions
and
68 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Usage: drupal site:compile --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos" | ||
command: | ||
name: site:compile | ||
description: 'Compiles the source, downloading and extracting the packages.' | ||
commands: | ||
# Run composer | ||
- command: site:compose | ||
arguments: | ||
name: '%{{name}}' | ||
# Run npm | ||
- command: exec | ||
arguments: | ||
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" \;' | ||
# Run grunt | ||
- command: exec | ||
arguments: | ||
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" \;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Usage: drupal site:configure --placeholder="name:subscriptions" | ||
command: | ||
name: site:configure | ||
description: 'Generates the necessary configuration files.' | ||
commands: | ||
# Create settings.db.php | ||
- command: site:settings:db | ||
arguments: | ||
name: '%{{name}}' | ||
# Create settings.local.php | ||
- command: site:settings:local | ||
arguments: | ||
name: '%{{name}}' | ||
# Create settings.memcache.php | ||
- command: site:settings:memcache | ||
arguments: | ||
name: '%{{name}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Usage: drupal site:construct --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos" | ||
command: | ||
name: site:construct | ||
description: 'Sets the site up based on current configuration and database.' | ||
commands: | ||
# Clear cache | ||
- command: exec | ||
arguments: | ||
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush cr;' | ||
# Set default drush alias | ||
- command: exec | ||
arguments: | ||
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush site-set @vm;' | ||
# Run db updates | ||
- command: exec | ||
arguments: | ||
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush updb -y;' | ||
# Import configuration twice to fix a problem with config import when new modules are added to core.extensions.yml | ||
- command: exec | ||
arguments: | ||
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush cim -y; drush cim -y' | ||
# Clear cache | ||
- command: exec | ||
arguments: | ||
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/web; drush cr;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Usage: drupal site:rebuild:prod --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos" | ||
command: | ||
name: site:rebuild:prod | ||
description: 'Peforms necessary steps to build the site from a given source.' | ||
commands: | ||
# Compile the packages. | ||
- command: site:compile | ||
options: | ||
placeholder: | ||
- 'name:%{{name}}' | ||
- 'root:%{{root|\/vagrant\/repos}}' | ||
# Build the site based on existing setup. | ||
- command: site:construct | ||
options: | ||
placeholder: | ||
- 'name:%{{name}}' | ||
- 'root:%{{root|\/vagrant\/repos}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,26 @@ | ||
# Usage: drupal site:rebuild --placeholder="name:subscriptions" | ||
# Usage: drupal site:rebuild --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos" | ||
command: | ||
name: site:rebuild | ||
description: 'Performs multiple commands to build a site (without git checkout)' | ||
description: 'Peforms necessary steps to build the site from a given source.' | ||
commands: | ||
# Run composer | ||
- command: site:compose | ||
arguments: | ||
name: '%{{name}}' | ||
# Run npm | ||
- command: site:npm | ||
# Compile the packages. | ||
- command: site:compile | ||
options: | ||
placeholder: | ||
- 'name:%{{name}}' | ||
# Run grunt | ||
- command: site:grunt | ||
- 'root:%{{root|\/vagrant\/repos}}' | ||
# Generate the settings. | ||
- command: site:configure | ||
options: | ||
placeholder: | ||
- 'name:%{{name}}' | ||
# Create settings.db.php | ||
- command: site:settings:db | ||
arguments: | ||
name: '%{{name}}' | ||
# Create settings.local.php | ||
- command: site:settings:local | ||
arguments: | ||
name: '%{{name}}' | ||
# Create phpunit.xml | ||
- command: site:phpunit:setup | ||
arguments: | ||
name: '%{{name}}' | ||
# Create behat.yml | ||
- command: site:behat:setup | ||
arguments: | ||
name: '%{{name}}' | ||
# Create settings.memcache.php | ||
- command: site:settings:memcache | ||
arguments: | ||
name: '%{{name}}' | ||
# Imports db or installs a site | ||
- command: site:db:import | ||
arguments: | ||
name: '%{{name}}' | ||
# Clear cache | ||
- command: exec | ||
arguments: | ||
bin: 'cd /vagrant/repos/%{{name}}/web; drush cr;' | ||
# Set default drush alias | ||
- command: exec | ||
arguments: | ||
bin: 'cd /vagrant/repos/%{{name}}/web; drush site-set @vm;' | ||
# Run db updates | ||
- command: exec | ||
arguments: | ||
bin: 'cd /vagrant/repos/%{{name}}/web; drush updb -y;' | ||
# Import configuration twice to fix a problem with config import when new modules are added to core.extensions.yml | ||
- command: exec | ||
arguments: | ||
bin: 'cd /vagrant/repos/%{{name}}/web; drush cim -y;drush cim -y' | ||
# Clear cache | ||
- command: exec | ||
arguments: | ||
bin: 'cd /vagrant/repos/%{{name}}/web; drush cr;' | ||
# Build the site based on existing setup. | ||
- command: site:construct | ||
options: | ||
placeholder: | ||
- 'name:%{{name}}' | ||
- 'root:%{{root|\/vagrant\/repos}}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Usage: drupal site:test --placeholder="name:subscriptions" --placeholder="root:\/vagrant\/repos" | ||
command: | ||
name: site:test | ||
description: 'Sets the test suites up and then runs them.' | ||
commands: | ||
# Create phpunit.xml | ||
- command: site:phpunit:setup | ||
arguments: | ||
name: '%{{name}}' | ||
# Create behat.yml | ||
- command: site:behat:setup | ||
arguments: | ||
name: '%{{name}}' | ||
# Run Behat | ||
- command: exec | ||
arguments: | ||
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}/tests; ./behat;' | ||
# Run phpunit | ||
- command: exec | ||
arguments: | ||
bin: 'cd %{{root|\/vagrant\/repos}}/%{{name}}; phpunit;' |