backdrop-contrib / backdrop-drush-extension

A set of commands and boot class for Drush and Backdrop CMS.
GNU General Public License v2.0
13 stars 18 forks source link

Support `drush --version` (and `drush version) #213

Closed rfay closed 4 years ago

rfay commented 4 years ago

I was trying to test that we got latest extensions into ddev.

$ drush --version
Drush Launcher Version: 0.6.0
This command is not supported yet by Backdrop.

$ drush8 --version
This command is not supported yet by Backdrop.

It would be super nice if instead of hiding the normal drush version result with a "not supported" it would show backdrop extensions version in addition to drush version.

I really like how drush launcher does this, reporting

$ drush --version
Drush Launcher Version: 0.6.0
Drush Commandline Tool 10.2.0
serundeputy commented 4 years ago

Hello @rfay thanks for bringing up this issue.

PR: https://github.com/backdrop-contrib/drush/pull/214

You can now get the versions of Drush proper and the Backdrop Drush Extension with drush version or drush --version.

└─ $ ∴ lando.dev drush version
Drush proper version: 8.2.4-dev
Backdrop Drush Extension version: 1.x-1.x

Honorable mention drush st; also returns the two versions plus other status info:

└─ $ ∴ lando.dev drush st;
 Backdrop version         :  1.14.x-dev               
 Site URI                 :  https://drush.lndo.site  
 Database driver          :  mysql                    
 Database hostname        :  database                 
 Database port            :  3306                     
 Database username        :  backdrop                 
 Database name            :  backdrop                 
 Backdrop bootstrap       :  Successful               
 Backdrop user            :                           
 PHP executable           :  /usr/local/bin/php       
 PHP configuration        :                           
 PHP OS                   :  Linux                    
 Drush script             :  /app/web/drush/drush.php 
 Drush version            :  8.2.4-dev                
 Backdrop Drush           :  1.x-1.x                  
 Drush temp directory     :  /tmp                     
 Drush configuration      :                           
 Drush alias files        :                           
 Install profile          :  standard                 
 Backdrop Settings File   :  ./settings.php 
serundeputy commented 4 years ago

This is merged and available in 1.x-1.x will ship with 1.3.0.