Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Determine Drupal versio using Drush #2

Open
kasperg opened this issue Aug 22, 2011 · 1 comment
Open

Determine Drupal versio using Drush #2

kasperg opened this issue Aug 22, 2011 · 1 comment

Comments

@kasperg
Copy link
Member

kasperg commented Aug 22, 2011

The Drupal version can be retrieved using drush statusinstead of using a property.

@drupol
Copy link
Contributor

drupol commented Mar 28, 2012

If you need to do it in bash, you can use:

drush st | grep -i "Drupal version" | cut -c 27-

or this:

drush st | grep -i "Drupal version" | sed 's/ Drupal version        :  //'

or this:

drush st | grep -i "Drupal version" | awk -F ":" '{print $2}'

or this (untested but working in bash)

<drush command="status" returnProperty="status" returnGlue="${line.separator}"/>
<exec command="echo ${${status}: -4}" returnProperty="drupal.version"/>

Now using phing:

 <drush command="status" returnProperty="status" returnGlue="${line.separator}"/>
 <exec command='echo "${status}" | grep -i "Drupal version" | cut -c 27-' returnProperty="drupal.version"/>

If I have time, I'll try to provide a patch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants