Skip to content

Instantly share code, notes, and snippets.

@esolitos
Last active October 18, 2016 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esolitos/bf7d8f536878f4f69d54c31462c172d4 to your computer and use it in GitHub Desktop.
Save esolitos/bf7d8f536878f4f69d54c31462c172d4 to your computer and use it in GitHub Desktop.
Remove develop-only modules and export the config.
# This is a Drupal Console (chain file)[https://docs.drupalconsole.com/en/commands/chain.html].
# Needs to be deployed in `~/.console/chain` directory.
# Can be be run using `drupal chain --file=~/.console/chain/deploy-config.yml`.
#
# The purpouse if this chain is to remove "devel-only" modules and config from the configuration
# export, so that we can avoid issues in the syncronisation in Staging/Production.
#
commands:
# Remove 'devel' modules
- command: module:uninstall
arguments:
module: config_devel drupalmoduleupgrader cache_clear_shortcut config_devel kint devel_generate stage_file_proxy yaml_editor
# Export the config
- command: config:export
<?php
/*
Optionally:
Export the configuration to a directory under VCS, so that we can track changes and deploy them easily.
*/
$config_directories = array(
#CONFIG_ACTIVE_DIRECTORY => __DIR__ . '/config/active/',
CONFIG_STAGING_DIRECTORY => __DIR__ . '/config/staging/',
CONFIG_SYNC_DIRECTORY => __DIR__ . '/config/sync/',
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment