Zum Inhalt springen

Drush

Aus Computech CMS Wiki

Drush arbeitet sehr eng mit Git zusammen

Drush Befehle

Befehl Beispiel Bemerkungen
drush dl drush dl drupal Core Herunterladen
drush dl Module --dev drush dl admin_toolbar --dev Module DEV Branch Herunterladen
drush dl Module --select drush dl admin_toolbar --select Module Version auswählen
drush up drush up module Modulee Updaten
Beispiel Beispiel Beispiel


Wo ist Drush installiert?

which drush

Drush Upgrade

DAN

cd /usr/local/bin
php -r "readfile('https://s3.amazonaws.com/files.drush.org/drush.phar');" > drush
chmod +x drush


composer require "drush/drush:8.*"

Anleitung unter:

https://www.lullabot.com/articles/switching-drush-versions

Drush Kommandos

Drush beispiele / Anwendungen

Drush Aliases

Installation

Ubuntu mit Sudo Rechte

sudo apt-get install drush

Installation ubuntu

https://www.drupal.org/node/1248790

pear channel-discover pear.drush.org
pear install drush/drush
drush version

Drush installation unter Cyon

Drush unter cyon installieren

Drush Upgrade

export PATH="$HOME/.composer/vendor/bin:$PATH"
composer global require drush/drush:7.*

Drush Fehlermeldung im Zusammenhang mit Commerce

Wenn unter Durpal 7 Drupal Commerce im Einsatz ist, kann unter Umständen drush nicht mehr gestartet werden.

Folgende Codeänderungen sind dann notwendig:

 --- commerce/modules/cart/commerce_cart.module	(revision )
 +++ commerce/modules/cart/commerce_cart.module	(revision )
 @@ -1339,7 +1339,8 @@
 
      // Allow other modules to specify what properties should be compared when
      // determining whether or not to combine line items.
 -    drupal_alter('commerce_cart_product_comparison_properties', $comparison_properties, clone($line_item));
 +    $line_item_clone = clone($line_item);
 +    drupal_alter('commerce_cart_product_comparison_properties', $comparison_properties, $line_item_clone);

      // Loop over each line item on the order.
      foreach ($order_wrapper->commerce_line_items as $delta => $matching_line_item_wrapper) {

Patch:

 https://www.drupal.org/files/issues/commerce-cart_product_add_php7-2762907-5.patch

Drush Install auf Hostpoint

curl -sS https://getcomposer.org/installer | php

Bash Profile anpassen

vim .bash_profile

Pfad von Composer einfügen:

alias composer="php ~/composer.phar"

Jetzt die Bash Profile neu laden:

source .bash_profile

Danach mit composer drush installieren

composer global require drush/drush:8.*

Oder:

composer global require drush/drush:dev-master

Pfad von drush einfügen:

vim .bash_profile
alias drush="~/.composer/vendor/drush/drush/drush"

BUGS

PHP Version ändern: auf PHP CLI 7.1 count(): Parameter must be an array or an object that implements Countable Table.php:789 [warning]

sudo update-alternatives --set php /usr/bin/php7.1