Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build script doesn't work with Drush 6 #14

Open
bwebster719 opened this issue Mar 25, 2015 · 1 comment
Open

Build script doesn't work with Drush 6 #14

bwebster719 opened this issue Mar 25, 2015 · 1 comment

Comments

@bwebster719
Copy link

Drush 6 doesn't understand the --component=root flag in the command "drush site-alias @self --component=root". Therefore, to get around this, I modified my copy of scripts/libs/luggage.sh

I replaced the line:
DRUPALROOT=$(drush site-alias $ALIAS --component=root)

With:
DRUSHVERSION=$(drush --version --pipe)

if [[ $DRUSHVERSION == "5."* ]]
then
DRUPALROOT=$(drush site-alias $ALIAS --component=root)
elif [[ $DRUSHVERSION == "6."* ]]
then
DRUPALROOT=$(drush site-alias $ALIAS --format=csv --fields=root --field-labels=0)
else
echo "Unknown version of Drush" && exit 1
fi

This should work in both Drush 5.9.x, as well as 6.x. I've ran it a few times in 6.2.0. If you have a newer version of Drush, it will exit the script gracefully

@jrearick
Copy link
Member

I'm playing with this on my own fork at https://github.com/jrearick/luggage/blob/issue14/scripts/libs/luggage.sh. Tested locally on Drush 5.9, but when I tried on a box I have drush 6.0 on, it fails.

drush doesn't know what --field-labels is on the line:
DRUPALROOT=$(drush site-alias $ALIAS --format=csv --fields=root --field-labels=0)

I got it to work by changing the line to:
drush site-alias @self --fields=root --format=list

Still have some further testing to do.

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

No branches or pull requests

2 participants