Giter Site home page Giter Site logo

drush-module-manager's Introduction

This can be used to enable/disable modules on different (multi)sites and environments (during automatic deploy for example).

Dependencies:

Installation:

The Symfony YAML component must be extracted to the libraries folder so that you have the following file locations:

  • sites/all/libraries/yaml/Parser.php
  • sites/all/libraries/yaml/README.md

Usage:

Set $conf['env'] to settings.php or via variable_set('env', 'anything'); to use environment specific modules (optional)

Run:

  • drush dmodm to use default dependencies.yaml file
  • drush dmodm --yaml-file /absolute/path/to/your/module-dependencies.yaml to use absolute path
  • drush dmodm --yaml-file module-dependencies.yaml to load from the module directory

Examples

Same modules on every site and environment.

all: # <- Global modules
  views: 1

Environment specific modules (no multisite).

all: # <- Global modules
  views: 1
local: # <- Local (environment) specific modules
  all:
    views_ui: 1
prod: # <- Prod (environment) specific modules
  all:
    devel: 0
    maillog: 0

Evironment and site specific modules.

all: # <- Global modules
  views: 1
local: # <- Local (environment) specific modules
  all: # <- Modules that will be enabled on every (multi) site
    views_ui: 1
  multisite1: # <- Modules that will be enabled only on this site
    webform: 1
    context: 1
prod: # <- Prod (environment) specific modules
  all: # <- Modules that will be enabled on every (multi) site
    devel: 0
    maillog: 0
  multisite1: # <- Modules that will be enabled only on this site
    admin_menu: 1
    entity: 1

Site specific settings will always override environment and environment will always override global.

Capistrano example

set :drush, "cd #{fetch(:app_path)} ; drush"

# List the Drupal multi-site folders. Use "default" if no multi-sites are installed.
set :domains, ['default']
 desc 'Update module dependencies'
  task :dmodm do
    on release_roles :all do
      fetch(:domains).each do |domain|
      execute "#{fetch(:drush)} dmodm -y --uri=#{domain}"
    end
  end
end

drush-module-manager's People

Contributors

tuutti avatar

Stargazers

Jussi Viitamäki avatar Antti Salminen avatar

Watchers

 avatar

Forkers

jussiviitamaki

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.