4

I have drush installed using what in principle is the latest stable build as per the instructions. When I run drush version then i get the reply 8.0.3, however on my workstation with Dev Desktop installed it tells me it's 8.0.5.

Running drush dl drush proposes a version 8.x-6.x-dev dated 30 September 2013 which seems very old, and I can see no sign of a v8.1

Looking at the documentation I have not been able to see any other indications of how to go about this, and I am confused. Can anyone tell me whether the drush dl drush is still valid and what the current latest version actually is?

2

3 Answers 3

1

drush dl was never supposed to be used to download Drush. It happens to work because Drush is hosted on drupal.org as module, but the latest development are done on github.com. On drupal.org, you find just old versions, dated 2013.

As per July 17, 2016, the latest version is 8.1.2. You can install it using Composer, if you are using any Linux OS, or OS X, and in this case it is easy as running the following command:

composer global require drush/drush:~8

Don't forget to add ~/.composer/vendor/bin to your shell PATH variable, or the shell will not find Drush's executable.

1

You can read on drupal.org/project/drush that:

The Drush project has moved to Github.

so that explains why the latest git commits are from 2013.

Therefore you should follow the installation instruction available at docs.drush.org (Drush documentation) or installation via Composer. Here is installation of latest Drush via Phar on Linux:

sudo install <(curl http://files.drush.org/drush.phar) /usr/local/bin/drush

On OS X, you can install via brew (brew install drush), on Windows download release files manually.

0

First, you can find your exact location of drush you installed. If you are Mac/Linux user, you can use below command.

which drush

In my computer, it shows that is an alias which maps to another location.

lrwxrwxrwx  1 root root      28 Dec  8  2015 drush -> /usr/local/share/drush/drush

If you list the files in /usr/local/share/drush, you will find that there is .git folder.

-rw-r--r--  1 root root   617 Dec  8  2015 box.json.dist
drwxr-xr-x  8 root root  4096 Dec  8  2015 commands
-rw-r--r--  1 root root  1997 Jun  3 12:01 composer.json
-rw-r--r--  1 root root 53683 Jun  3 12:01 composer.lock
-rw-r--r--  1 root root  2469 Dec  8  2015 CONTRIBUTING.md
drwxr-xr-x  2 root root  4096 Jun  3 12:01 docs
-rwxr-xr-x  1 root root  4368 Jun  3 12:01 drush
-rw-r--r--  1 root root 14013 Jun  3 12:01 drush.api.php
-rwxr-xr-x  1 root root   743 Dec  8  2015 drush.bat
-rwxr-xr-x  1 root root  1937 Jun  3 12:01 drush.complete.sh
-rw-r--r--  1 root root    20 Jun  3 12:01 drush.info
-rwxr-xr-x  1 root root  4954 Dec  8  2015 drush.launcher
-rw-r--r--  1 root root 23280 Dec  8  2015 drush_logo-black.png
-rwxr-xr-x  1 root root   221 Dec  8  2015 drush.php
drwxr-xr-x  2 root root  4096 Jun  3 12:01 examples
drwxr-xr-x  8 root root  4096 Jun  3 12:01 .git
-rw-r--r--  1 root root   199 Jun  3 12:01 .gitignore
drwxr-xr-x  2 root root  4096 Jun  3 12:01 includes
drwxr-xr-x  3 root root  4096 Dec  8  2015 lib
drwxr-xr-x  3 root root  4096 Dec  8  2015 misc
-rw-r--r--  1 root root   644 Jun  3 12:01 mkdocs.yml
-rw-r--r--  1 root root  3152 Dec  8  2015 README.md
drwxr-xr-x  7 root root  4096 Jun  3 12:01 tests
-rw-r--r--  1 root root  6523 Jun  3 12:01 .travis.yml
-rwxr-xr-x  1 root root    83 Dec  8  2015 unish.sh
drwxr-xr-x 16 root root  4096 Dec  8  2015 vendor

You can list all drush version with git tag, then you pick one and checkout the version you like.

git checkout 8.0.5

If you don't have the version you want, just simply git pull the latest commits.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.