{"id":18720499,"url":"https://github.com/dennisinteractive/drupal_console_commands","last_synced_at":"2025-04-12T14:20:44.796Z","repository":{"id":56965715,"uuid":"72202774","full_name":"dennisinteractive/drupal_console_commands","owner":"dennisinteractive","description":null,"archived":false,"fork":false,"pushed_at":"2020-09-27T19:15:40.000Z","size":30746,"stargazers_count":5,"open_issues_count":6,"forks_count":5,"subscribers_count":45,"default_branch":"master","last_synced_at":"2025-03-26T08:51:34.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dennisinteractive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-28T11:43:03.000Z","updated_at":"2020-09-22T10:50:45.000Z","dependencies_parsed_at":"2022-08-21T06:10:23.711Z","dependency_job_id":null,"html_url":"https://github.com/dennisinteractive/drupal_console_commands","commit_stats":null,"previous_names":[],"tags_count":57,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennisinteractive%2Fdrupal_console_commands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennisinteractive%2Fdrupal_console_commands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennisinteractive%2Fdrupal_console_commands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dennisinteractive%2Fdrupal_console_commands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dennisinteractive","download_url":"https://codeload.github.com/dennisinteractive/drupal_console_commands/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578874,"owners_count":21127714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T13:31:20.982Z","updated_at":"2025-04-12T14:20:44.776Z","avatar_url":"https://github.com/dennisinteractive.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dennis Console\n\nProvides custom Drupal console commands and chains.\n\n## Requirements\n\n- [Composer](https://getcomposer.org/download/)\n\n## Installation\n\n```\ncurl -L https://raw.githubusercontent.com/dennisinteractive/drupal_console_commands/master/Makefile \u003e Makefile\n\nmake install\n```\n\t\n## Commands\n\nThese are custom commands used to build a site. The information about the site comes from `~/.console/sites/site-name.yml`.\nSee some examples of site YAML files at [https://github.com/dennisinteractive/drupal_console\\_commands/tree/master/sites](https://github.com/dennisinteractive/drupal_console_commands/tree/master/sites)\n\n- drupal **site:build** \n\n\tRuns the following commands to build a site:\n    \n    - site:checkout\n    - site:compose|make\n    - site:npm\n    - site:grunt\n    - site:settings\n    - site:phpunit:setup\n    - site:behat:setup\n    - site:db:import\n    - site:update\n    \n\toptions:\n    \n    - skip: Use this option to leave out one or more commands. i.e. `--skip=\"checkout, phpunit:setup\"` will run all the steps above except`site:checkout` and `site:phpunit:setup`.\n\n- drupal **site:new**\n\t\n\tBuilds a new site using a Drupal project as template from one of the following:\n\t\t\n\t- drupal-composer/drupal-project:8.x-dev\n\t- acquia/lightning-project\n\t- acquia/reservoir-project\n\n- drupal **site:checkout** *site-name* [--branch|--tag]\n\t\n\tPerforms a git clone and checks out the specified branch or tag\n\n\t- drupal **site:checkout:tag** *site-name* --tag\n\t\n\t\tPerforms a `git clone` and checks out the specified tag/revision\n\n\t- drupal **site:checkout:branch** *site-name* --branch\n\t\n\t\tPerforms a `git clone` and checks out the specified branch\n\n- drupal **site:compose** *site-name* \n\n\tRuns `composer install`\n\t\n- drupal **site:make** *site-name* \n\n\tRuns `drush make`\n\n- drupal **site:npm** \n\n\tCompiles NPM packages and runs `npm`\n\n- drupal **site:grunt** \n\n\tCompiles Grunt packages and runs `grunt`\n\n- drupal **site:settings** *site-name*\n    \n    - Runs the following commands:\n    \t\n    \t- site:settings:db\n    \t- site:settings:memcache\n    \t\n    - Creates *settings.php* using *default.settings.php* provided by Drupal core\n    - Appends includes for the settings below:\n    \t\n      - *settings.db.php*  for database credentials.\n      - *settings.memcache.php* for memcache configuration.\n\t   - *settings.local.php* in the *web/sites/[site name]* directory. \n\t  \n\t\tThis 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`.\n\t  \n\t  - *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 -\u003e settings.dev.php\n\t  - *settings.mine.php* Use this file to add your personal customisations to override all of the above.\n\n  **It is recommended that you add settings.*.php to .gitignore.**\n\n- drupal **site:settings:db** *site-name*\n\t\n\tCreates *settings.db.php* in the *web/sites/default* folder. This file contains DB credentials and should not be committed.\n\n- drupal **site:settings:memcache** *site-name*\n\t\n\tCreates *settings.memcache.php* in the *web/sites/default* folder. This file contains Memcache configuration and should not be committed.\n\n- drupal **site:phpunit:setup** *site-name*\n\t\n\tCreates *phpunit.xml* in the root. This file contains PHPUnit configuration and should not be committed.\n\n- drupal **site:behat:setup** *site-name*\n\t\n\tCreates *behat.yml* in the *tests* folder. This file contains Behat configuration and should not be committed.\n\n- drupal **site:db:import** *site-name*\n\t\n\tIf 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`.\n\t\n\tThe 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.\n\t\n\tIf no db-dump information is available or there is no dump at the location, it will run a site install.\n\t\n\tCurrently, the supported extensions are `.sql` and `.sql.gz` only.\n\n- drupal **site:update** *site-name*\n\n  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:\n  \n  ```\n    modules:\n      enable:\n        - stage_file_proxy\n        - devel\n      disable:\n        - cdn\n  ```\n\n- drupal **site:test** *site-name*\n\t\n   Runs test suites\n   \n      - `./behat %s` (Behat tests)\n      - `./vendor/bin/phpunit` (PHPUnit tests)\n\n## Environment specific chains\n\nEach environment will have its own chain that executes the relevant commands and chains\n\n### Artifact\n\n- drupal **site:build:artifact** \n\t\n\tPrepares artifacts and runs the following:\n    \n    - site:checkout\n    - site:compose\n    - site:npm\n    - site:grunt\n\n### CI\n- drupal **site:build:ci** \n\n\tBuilds a site for CI and runs the following:\n    \n    - site:db:import\n    - site:update\n    - site:test\n\n### QA\n\n- drupal **site:build:qa** \n\n\tBuilds a site for QA and runs the following:\n    \n    - site:db:import\n    - site:update\n    - site:test\n\n### Staging\n\n- drupal **site:build:staging** \n\n\tBuilds a site for Staging and runs the following:\n    \n    - site:db:import\n    - site:update\n\n### Production\n\n- drupal **site:build:prod** \n\n\tRuns updates on production and runs the following:\n\t\n  \t- site:update\n\n## Useful arguments and options\n\n- **-h** - Shows all the available arguments and options.\n- **--no-interaction** - Executes the command without asking any optional argument\n- **--skip** - Skips the execution of one or more commands (only `site:build`).\n\n## Environment variables\n\nBy default, the commands will use parameters from the `site.yml`, but it is possible to override them using environment variables.\n\nFor example, to override the root directory you can set the variable before calling `site:build`\n\n`export site_destination_directory=\"/directory/\"`\n\n## Usage examples\n\n```\ndrupal site:build\ndrupal site:build d7-example\ndrupal site:build d7-example -e dev --branch=\"master\"\ndrupal site:build d7-example -e dev --branch=\"master\" --skip=\"checkout, compose\"\ndrupal site:db:import d7-example\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennisinteractive%2Fdrupal_console_commands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdennisinteractive%2Fdrupal_console_commands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdennisinteractive%2Fdrupal_console_commands/lists"}