2017 © Pedro Peláez
 

drupal-console-library drupal_console_commands

Custom commands for Drupal console.

image

dennisdigital/drupal_console_commands

Custom commands for Drupal console.

  • Monday, April 23, 2018
  • by dennisdigital
  • Repository
  • 22 Watchers
  • 4 Stars
  • 2,064 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 5 Forks
  • 5 Open issues
  • 89 Versions
  • 10 % Grown

The README.md

Dennis Console

Provides custom Drupal console commands and chains., (*1)

Requirements

Installation

curl -L https://raw.githubusercontent.com/dennisinteractive/drupal_console_commands/master/Makefile > Makefile

make install

Commands

These are custom commands used to build a site. The information about the site comes from ~/.console/sites/site-name.yml. See some examples of site YAML files at https://github.com/dennisinteractive/drupal_console_commands/tree/master/sites, (*2)

  • drupal site:build, (*3)

    Runs the following commands to build a site:, (*4)

    • site:checkout
    • site:compose|make
    • site:npm
    • site:grunt
    • site:settings
    • site:phpunit:setup
    • site:behat:setup
    • site:db:import
    • site:update

    options:, (*5)

    • skip: Use this option to leave out one or more commands. i.e. --skip="checkout, phpunit:setup" will run all the steps above exceptsite:checkout and site:phpunit:setup.
  • drupal site:new, (*6)

    Builds a new site using a Drupal project as template from one of the following:, (*7)

    • drupal-composer/drupal-project:8.x-dev
    • acquia/lightning-project
    • acquia/reservoir-project
  • drupal site:checkout site-name [--branch|--tag], (*8)

    Performs a git clone and checks out the specified branch or tag, (*9)

    • drupal site:checkout:tag site-name --tag, (*10)

      Performs a git clone and checks out the specified tag/revision, (*11)

    • drupal site:checkout:branch site-name --branch, (*12)

      Performs a git clone and checks out the specified branch, (*13)

  • drupal site:compose site-name, (*14)

    Runs composer install, (*15)

  • drupal site:make site-name, (*16)

    Runs drush make, (*17)

  • drupal site:npm, (*18)

    Compiles NPM packages and runs npm, (*19)

  • drupal site:grunt, (*20)

    Compiles Grunt packages and runs grunt, (*21)

  • drupal site:settings site-name, (*22)

    • Runs the following commands:, (*23)

      • site:settings:db
      • site:settings:memcache
    • Creates settings.php using default.settings.php provided by Drupal core, (*24)

    • Appends includes for the settings below:, (*25)

      • settings.db.php for database credentials.
      • settings.memcache.php for memcache configuration.
      • settings.local.php in the web/sites/[site name] directory.

      This file is auto-generated and should not be committed. If you have a file named web/sites/example.settings.local.php in the site's folder, it will be used as a template for settings.local.php., (*26)

      • settings.[env].php These files are auto-generated and should not be committed. Depending on your environment (--env option), it will copy the respective file into web/sites/[site name]. i.e. default.settings.dev.php -> settings.dev.php
      • settings.mine.php Use this file to add your personal customisations to override all of the above.

    It is recommended that you add settings.*.php to .gitignore., (*27)

  • drupal site:settings:db site-name, (*28)

    Creates settings.db.php in the web/sites/default folder. This file contains DB credentials and should not be committed., (*29)

  • drupal site:settings:memcache site-name, (*30)

    Creates settings.memcache.php in the web/sites/default folder. This file contains Memcache configuration and should not be committed., (*31)

  • drupal site:phpunit:setup site-name, (*32)

    Creates phpunit.xml in the root. This file contains PHPUnit configuration and should not be committed., (*33)

  • drupal site:behat:setup site-name, (*34)

    Creates behat.yml in the tests folder. This file contains Behat configuration and should not be committed., (*35)

  • drupal site:db:import site-name, (*36)

    If a database dump is available, it will drop the current database and import the dump. The information for this comes from ~/.console/sites/site-name.yml., (*37)

    The command will copy the dump from the original place to /tmp. Runing the command again will only copy the file if the original has changed. This is very useful when working remotely on slow networks., (*38)

    If no db-dump information is available or there is no dump at the location, it will run a site install., (*39)

    Currently, the supported extensions are .sql and .sql.gz only., (*40)

  • drupal site:update site-name, (*41)

    Runs updates, import configuration, clear caches. You can enable or disable modules after import by adding the list to the site.yml file as follows:, (*42)

    modules:
      enable:
        - stage_file_proxy
        - devel
      disable:
        - cdn
    
  • drupal site:test site-name, (*43)

    Runs test suites, (*44)

    • ./behat %s (Behat tests)
    • ./vendor/bin/phpunit (PHPUnit tests)

Environment specific chains

Each environment will have its own chain that executes the relevant commands and chains, (*45)

Artifact

  • drupal site:build:artifact, (*46)

    Prepares artifacts and runs the following:, (*47)

    • site:checkout
    • site:compose
    • site:npm
    • site:grunt

CI

  • drupal site:build:ci, (*48)

    Builds a site for CI and runs the following:, (*49)

    • site:db:import
    • site:update
    • site:test

QA

  • drupal site:build:qa, (*50)

    Builds a site for QA and runs the following:, (*51)

    • site:db:import
    • site:update
    • site:test

Staging

  • drupal site:build:staging, (*52)

    Builds a site for Staging and runs the following:, (*53)

    • site:db:import
    • site:update

Production

  • drupal site:build:prod, (*54)

    Runs updates on production and runs the following:, (*55)

    • site:update

Useful arguments and options

  • -h - Shows all the available arguments and options.
  • --no-interaction - Executes the command without asking any optional argument
  • --skip - Skips the execution of one or more commands (only site:build).

Environment variables

By default, the commands will use parameters from the site.yml, but it is possible to override them using environment variables., (*56)

For example, to override the root directory you can set the variable before calling site:build, (*57)

export site_destination_directory="/directory/", (*58)

Usage examples

drupal site:build
drupal site:build d7-example
drupal site:build d7-example -e dev --branch="master"
drupal site:build d7-example -e dev --branch="master" --skip="checkout, compose"
drupal site:db:import d7-example

The Versions

23/04 2018

dev-marcelo

dev-marcelo

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

23/04 2018

dev-master

9999999-dev

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

23/04 2018

dev-29770_dc_upgrade

dev-29770_dc_upgrade

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

17/04 2018

dev-abstractawarecommand

dev-abstractawarecommand

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

06/04 2018

dev-skip_config_import

dev-skip_config_import

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

03/04 2018

0.44.x-dev

0.44.9999999.9999999-dev

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

03/04 2018

0.44.0.1

0.44.0.1

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

03/04 2018

0.48.x-dev

0.48.9999999.9999999-dev

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

03/04 2018

0.48.0.1

0.48.0.1

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

30/03 2018

dev-0.48.x-29751_db_import_fix

dev-0.48.x-29751_db_import_fix

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

11/09 2017

1.0

1.0.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

06/09 2017

dev-centos6

dev-centos6

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

06/09 2017

dev-extend_properly

dev-extend_properly

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

06/09 2017

dev-site_build_command

dev-site_build_command

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

05/09 2017

dev-site_example

dev-site_example

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

01/09 2017

dev-distro_build_chain

dev-distro_build_chain

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

30/08 2017

dev-distro_build_command

dev-distro_build_command

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

development console symfony drupal

06/08 2017

dev-downloaddb_replacement

dev-downloaddb_replacement

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

04/08 2017

dev-module_enable_disable

dev-module_enable_disable

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

04/08 2017

dev-settings_command

dev-settings_command

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

04/08 2017

dev-peterc_commands

dev-peterc_commands

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

04/08 2017

dev-support_multi_core

dev-support_multi_core

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

04/08 2017

dev-fixing_env_detection

dev-fixing_env_detection

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

21/07 2017

dev-upgrade_to_latest_console

dev-upgrade_to_latest_console

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

18/07 2017

0.50

0.50.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

18/07 2017

dev-27689_artifact_tag_checkout

dev-27689_artifact_tag_checkout

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

18/07 2017

0.49

0.49.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

17/07 2017

dev-27689_remove_hardcoded_web_folder

dev-27689_remove_hardcoded_web_folder

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

12/07 2017

dev-27689_artifact_chain_fix

dev-27689_artifact_chain_fix

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

15/06 2017

dev-27689_console_commands

dev-27689_console_commands

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

15/06 2017

0.48

0.48.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

07/06 2017

0.47

0.47.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

07/06 2017

0.46

0.46.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

16/05 2017

0.45

0.45.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

15/05 2017

0.44

0.44.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

15/05 2017

dev-27611_s3

dev-27611_s3

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

12/05 2017

dev-27689_refactor

dev-27689_refactor

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

05/05 2017

0.43

0.43.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

03/05 2017

dev-27790_console_updates

dev-27790_console_updates

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

27/04 2017

0.42

0.42.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

27/04 2017

0.41

0.41.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

19/04 2017

0.40

0.40.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

13/04 2017

dev-proposal_console_chains

dev-proposal_console_chains

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

29/03 2017

0.39

0.39.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

27/03 2017

dev-27657_CDN

dev-27657_CDN

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

21/03 2017

0.38

0.38.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

21/03 2017

dev-27610_8.3_fixes

dev-27610_8.3_fixes

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

20/03 2017

0.37

0.37.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

20/03 2017

dev-run_updates_before_config_import

dev-run_updates_before_config_import

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

28/02 2017

dev-hotfix-dev-settings

dev-hotfix-dev-settings

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

24/02 2017

dev-hotdix-drush-permissions

dev-hotdix-drush-permissions

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

22/02 2017

0.36

0.36.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

21/02 2017

0.35

0.35.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

16/02 2017

dev-27188_memcache

dev-27188_memcache

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

11/01 2017

dev-drupal_extend_dependency_injection

dev-drupal_extend_dependency_injection

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

12/12 2016

0.34

0.34.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

08/12 2016

0.33

0.33.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

08/12 2016

0.32

0.32.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

07/12 2016

0.31

0.31.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

07/12 2016

0.30

0.30.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

01/12 2016

0.29

0.29.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

24/11 2016

0.28

0.28.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

21/11 2016

0.27

0.27.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

21/11 2016

0.26

0.26.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

20/11 2016

0.25

0.25.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

18/11 2016

0.24

0.24.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

17/11 2016

0.23

0.23.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

17/11 2016

0.22

0.22.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

16/11 2016

0.21

0.21.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

16/11 2016

0.20

0.20.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

16/11 2016

0.19

0.19.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

15/11 2016

0.18

0.18.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

development console symfony drupal

15/11 2016

0.17

0.17.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

  • php >=5.6

 

development console symfony drupal

15/11 2016

0.16

0.16.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

15/11 2016

0.15

0.15.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

14/11 2016

0.14

0.14.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

14/11 2016

0.13

0.13.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

11/11 2016

0.12

0.12.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

10/11 2016

0.11

0.11.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

10/11 2016

0.10

0.10.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

09/11 2016

0.9

0.9.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

03/11 2016

0.8

0.8.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

03/11 2016

0.7

0.7.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

03/11 2016

0.6

0.6.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

03/11 2016

0.5

0.5.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

03/11 2016

0.4

0.4.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

01/11 2016

0.3

0.3.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

28/10 2016

0.2

0.2.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal

28/10 2016

0.1

0.1.0.0

Custom commands for Drupal console.

  Sources   Download

GPL-2.0+

The Requires

 

development console symfony drupal