Skip to content

Commit

Permalink
[console] Relocate core config files. (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas committed Jan 8, 2018
1 parent 8bc9d40 commit b31f346
Show file tree
Hide file tree
Showing 28 changed files with 148 additions and 104 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ vars:
commands:
- command: exec
arguments:
bin: composer create-project %{{repository}} %{{drupal}} --prefer-dist --no-progress --no-interaction --no-install
bin: composer create-project {{repository}} {{drupal}} --prefer-dist --no-progress --no-interaction --no-install
- command: exec
arguments:
bin: composer require drupal/console-develop --dev --working-dir=%{{drupal}} --no-update
bin: composer require drupal/console-develop --dev --working-dir={{drupal}} --no-update
- command: exec
arguments:
bin: composer install --working-dir=%{{drupal}}
bin: composer install --working-dir={{drupal}}
- command: exec
arguments:
bin: drupal site:install standard --root=%{{drupal}} --db-type="sqlite" --no-interaction
bin: drupal site:install standard --root={{drupal}} --db-type="sqlite" --no-interaction
- command: exec
arguments:
bin: drupal develop:create:symlinks --code-directory=%{{code}} --root=%{{drupal}}
bin: drupal develop:create:symlinks --code-directory={{code}} --root={{drupal}}
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ commands:
# Create Drupal project using DrupalComposer
- command: exec
arguments:
bin: composer create-project %{{repository}} %{{directory}} --prefer-dist --no-progress --no-interaction
bin: composer create-project {{repository}} {{directory}} --prefer-dist --no-progress --no-interaction
# Install Drupal
- command: exec
arguments:
bin: drupal site:install %{{profile}} --root=%{{directory}} --db-type="sqlite" --no-interaction
bin: drupal site:install {{profile}} --root={{directory}} --db-type="sqlite" --no-interaction
# Start PHP built-in server
- command: exec
arguments:
bin: drupal server --root=%{{directory}}
bin: drupal server --root={{directory}}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ commands:
# Create Drupal project using Composer
- command: exec
arguments:
bin: composer create-project %{{repository}} %{{directory}} --prefer-dist --no-progress --no-interaction
bin: composer create-project {{repository}} {{directory}} --prefer-dist --no-progress --no-interaction
4 changes: 2 additions & 2 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ application:
name:
elephpant:
class: '\Drupal\Console\Core\Command\Exclude\ElephpantCommand'
arguments: ['@app.root', '@console.renderer']
arguments: ['@app.root', '@console.renderer', '@console.configuration_manager']
druplicon:
class: '\Drupal\Console\Core\Command\Exclude\DrupliconCommand'
arguments: ['@app.root', '@console.renderer']
arguments: ['@app.root', '@console.renderer', '@console.configuration_manager']
commands:
aliases: ~
defaults: ~
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
commands:
# Create dummy data
# Create dummy data
- command: create:users
options:
limit: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ commands:
menu_link_title: 'Example Config Form'
menu_parent: system.admin_config_system
menu_link_desc: 'A Example Config Form.'
# Rebuild routes
# Rebuild routes
- command: router:rebuild
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
commands:
# Install Drupal
# Install Drupal
- command: site:install
options:
langcode: en
db-type: '${{DATABASE_TYPE}}'
db-host: '${{DATABASE_HOST}}'
db-name: '${{DATABASE_NAME}}'
db-user: '${{DATABASE_USER}}'
db-pass: '${{DATABASE_PASSWORD}}'
db-port: '${{DATABASE_PORT}}'
db-type: '%env(DATABASE_TYPE)%'
db-host: '%env(DATABASE_HOST)%'
db-name: '%env(DATABASE_NAME)%'
db-user: '%env(DATABASE_USER)%'
db-pass: '%env(DATABASE_PASSWORD)%'
db-port: '%env(DATABASE_PORT)%'
site-name: 'Drupal 8 site'
site-mail: admin@example.org # default email
account-name: admin # default account
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ vars:
db_name: drupal
db_port: 3306
commands:
# Install Drupal
# Install Drupal
- command: site:install
options:
langcode: 'en'
db-type: '%{{db_type}}'
db-host: '%{{db_host}}'
db-name: '%{{db_name}}'
db-user: '%{{db_user}}'
db-pass: '%{{db_pass}}'
db-port: '%{{db_port}}'
db-type: '{{db_type}}'
db-host: '{{db_host}}'
db-name: '{{db_name}}'
db-user: '{{db_user}}'
db-pass: '{{db_pass}}'
db-port: '{{db_port}}'
site-name: 'Drupal 8 site'
site-mail: 'admin@example.org' # default email
account-name: 'admin' # default account
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
commands:
# Install Drupal
# Install Drupal
- command: site:install
options:
langcode: en
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
commands:
# Backup current database
# Backup current database
- command: database:dump
arguments:
database: 'default'
# Import configurations
# Import configurations
- command: config:import
# Run pending update hooks
# Run pending update hooks
- command: update:execute
arguments:
module: 'all'
# Rebuild caches
# Rebuild caches
- command: cache:rebuild
arguments:
cache: 'all'
Original file line number Diff line number Diff line change
Expand Up @@ -10,126 +10,126 @@ commands:
value: ca
- command: generate:doc:data
options:
file: '%{{data_path}}/ca.json'
file: '{{directory}}/ca.json'
- command: settings:set
arguments:
name: language
value: en
- command: generate:doc:data
options:
file: '%{{data_path}}/en.json'
file: '{{directory}}/en.json'
- command: settings:set
arguments:
name: language
value: es
- command: generate:doc:data
options:
file: '%{{data_path}}/es.json'
file: '{{directory}}/es.json'
- command: settings:set
arguments:
name: language
value: fr
- command: generate:doc:data
options:
file: '%{{data_path}}/fr.json'
file: '{{directory}}/fr.json'
- command: settings:set
arguments:
name: language
value: gu
- command: generate:doc:data
options:
file: '%{{data_path}}/gu.json'
file: '{{directory}}/gu.json'
- command: settings:set
arguments:
name: language
value: hi
- command: generate:doc:data
options:
file: '%{{data_path}}/hi.json'
file: '{{directory}}/hi.json'
- command: settings:set
arguments:
name: language
value: hu
- command: generate:doc:data
options:
file: '%{{data_path}}/hu.json'
file: '{{directory}}/hu.json'
- command: settings:set
arguments:
name: language
value: id
- command: generate:doc:data
options:
file: '%{{data_path}}/id.json'
file: '{{directory}}/id.json'
- command: settings:set
arguments:
name: language
value: ja
- command: generate:doc:data
options:
file: '%{{data_path}}/ja.json'
file: '{{directory}}/ja.json'
- command: settings:set
arguments:
name: language
value: ko
- command: generate:doc:data
options:
file: '%{{data_path}}/ko.json'
file: '{{directory}}/ko.json'
- command: settings:set
arguments:
name: language
value: mr
- command: generate:doc:data
options:
file: '%{{data_path}}/mr.json'
file: '{{directory}}/mr.json'
- command: settings:set
arguments:
name: language
value: pa
- command: generate:doc:data
options:
file: '%{{data_path}}/pa.json'
file: '{{directory}}/pa.json'
- command: settings:set
arguments:
name: language
value: pt_br
- command: generate:doc:data
options:
file: '%{{data_path}}/pt_br.json'
file: '{{directory}}/pt_br.json'
- command: settings:set
arguments:
name: language
value: ro
- command: generate:doc:data
options:
file: '%{{data_path}}/ro.json'
file: '{{directory}}/ro.json'
- command: settings:set
arguments:
name: language
value: ru
- command: generate:doc:data
options:
file: '%{{data_path}}/ru.json'
file: '{{directory}}/ru.json'
- command: settings:set
arguments:
name: language
value: tl
- command: generate:doc:data
options:
file: '%{{data_path}}/tl.json'
file: '{{directory}}/tl.json'
- command: settings:set
arguments:
name: language
value: vn
- command: generate:doc:data
options:
file: '%{{data_path}}/vn.json'
file: '{{directory}}/vn.json'
- command: settings:set
arguments:
name: language
value: zh_hans
- command: generate:doc:data
options:
file: '%{{data_path}}/zh_hans.json'
file: '{{directory}}/zh_hans.json'
- command: settings:set
arguments:
name: language
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,56 +24,56 @@ commands:
value: en
- command: generate:doc:gitbook
options:
path: '%{{directory}}/en'
path: '{{directory}}/en'
- command: settings:set
arguments:
name: language
value: es
- command: generate:doc:gitbook
options:
path: '%{{directory}}/es'
path: '{{directory}}/es'
- command: settings:set
arguments:
name: language
value: hi
- command: generate:doc:gitbook
options:
path: '%{{directory}}/hi'
path: '{{directory}}/hi'
- command: settings:set
arguments:
name: language
value: hu
- command: generate:doc:gitbook
options:
path: '%{{directory}}/hu'
path: '{{directory}}/hu'
- command: settings:set
arguments:
name: language
value: pt_br
- command: generate:doc:gitbook
options:
path: '%{{directory}}/pt_br'
path: '{{directory}}/pt_br'
- command: settings:set
arguments:
name: language
value: ro
- command: generate:doc:gitbook
options:
path: '%{{directory}}/ro'
path: '{{directory}}/ro'
- command: settings:set
arguments:
name: language
value: vn
- command: generate:doc:gitbook
options:
path: '%{{directory}}/vn'
path: '{{directory}}/vn'
- command: settings:set
arguments:
name: language
value: zh_hans
- command: generate:doc:gitbook
options:
path: '%{{directory}}/zh_hans'
path: '{{directory}}/zh_hans'
- command: settings:set
arguments:
name: language
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 2 additions & 12 deletions src/Command/CheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,8 @@ protected function execute(InputInterface $input, OutputInterface $output)

$checks = $this->requirementChecker->getCheckResult();
if (!$checks) {
$phpCheckFile = $this->configurationManager->getHomeDirectory().'/.console/phpcheck.yml';

if (!file_exists($phpCheckFile)) {
$phpCheckFile =
$this->configurationManager->getApplicationDirectory().
DRUPAL_CONSOLE_CORE.
'config/dist/phpcheck.yml';
}

$io->newLine();
$io->info($this->trans('commands.check.messages.file'));
$io->comment($phpCheckFile);
$phpCheckFile = $this->configurationManager
->getVendorCoreDirectory() . 'phpcheck.yml';

$checks = $this->requirementChecker->validate($phpCheckFile);
}
Expand Down
Loading

0 comments on commit b31f346

Please sign in to comment.