Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Projects
Groups
Snippets
Sign up now
Login
Sign in
Toggle navigation
Menu
Open sidebar
project
provision
Commits
7d1ce931
Commit
7d1ce931
authored
Feb 08, 2016
by
Christopher Gervais
Browse files
Issue
#2619158
: Switch to the latest Drush 8 phar by default.
parent
4eb2a454
Changes
2
Hide whitespace changes
Inline
Side-by-side
debian/aegir3-provision.postinst
View file @
7d1ce931
...
...
@@ -51,27 +51,61 @@ case "$1" in
# fix permissions on installed directories
chown
aegir:aegir
"
$VARLIB
"
# Install composer.
COMPOSER_HOME
=
"
$HOME
/.composer"
curl
-sS
https://getcomposer.org/installer | php
mv
composer.phar /usr/local/bin/composer
db_get
"aegir/drush_version"
DRUSH_VERSION
=
"
$RET
"
DRUSH_MAJOR_VERSION
=
$(
echo
$DRUSH_VERSION
|
cut
-d
.
-f1
)
if
[
"
$DRUSH_VERSION
"
=
"stable"
]
;
then
DRUSH_PHAR_URL
=
"http://files.drush.org/drush.phar"
elif
[
"
$DRUSH_VERSION
"
=
"unstable"
]
;
then
DRUSH_PHAR_URL
=
"http://files.drush.org/drush-unstable.phar"
elif
[
"
$DRUSH_MAJOR_VERSION
"
-ge
"8"
]
;
then
DRUSH_PHAR_URL
=
"https://github.com/drush-ops/drush/releases/download/
$DRUSH_VERSION
/drush.phar"
fi
if
[
-n
"
$DRUSH_PHAR_URL
"
]
;
then
curl
-Ss
$DRUSH_PHAR_URL
-o
drush
chmod
+x drush
DRUSH_PATH
=
"/usr/local/bin/drush"
# Rename an old drush executable.
if
[
-f
$DRUSH_PATH
]
;
then
mv
$DRUSH_PATH
$DRUSH_PATH
-old-
$(
date
+
'%Y-%m-%d'
)
fi
mv
drush
$DRUSH_PATH
else
# Drush versions prior to 8 aren't available as .phar's.
# Install composer.
COMPOSER_HOME
=
"
$HOME
/.composer"
curl
-sS
https://getcomposer.org/installer | php
mv
composer.phar /usr/local/bin/composer
# Install Drush.
su
-c
"composer global require drush/drush:
$DRUSH_VERSION
"
aegir
# Add composer's bin dir to the $PATH.
echo
"export PATH=
\"\$
HOME/.composer/vendor/bin:
\$
PATH
\"
"
>>
~aegir/.bashrc
# Install Drush.
su
-c
"composer global require drush/drush:
$DRUSH_VERSION
"
aegir
# Rename an old drush executable.
if
[
-f
/usr/local/bin/drush
]
;
then
mv
/usr/local/bin/drush /usr/local/bin/drush-old-
$(
date
+
'%Y-%m-%d'
)
fi
# Add compo
ser
'
s
bin dir to the $PATH
.
echo
"export PATH=
\"\$
HOME/.composer/vendor/bin:
\$
PATH
\"
"
>>
~aegir/.bashrc
# Symlink Drush for other u
sers
to use
.
ln
-s
~aegir/.composer/vendor/bin/drush /usr/local/bin
# Rename an old drush executable.
if
[
-f
/usr/local/bin/drush
]
;
then
mv
/usr/local/bin/drush /usr/local/bin/drush-old-
$(
date
+
'%Y-%m-%d'
)
fi
# Symlink Drush for other users to use.
ln
-s
~aegir/.composer/vendor/bin/drush /usr/local/bin
;;
abort-upgrade|abort-remove|abort-deconfigure
)
...
...
debian/aegir3-provision.templates
View file @
7d1ce931
Template:aegir/drush_version
Type: string
Default: 8.0.0
Description: Drush version to use.
Default: stable
Description: Drush version to use. "stable" will fetch the latest release.
"unstable" will fetch the daily dev build. Otherwise, specify a version
number, e.g. "8.0.3".
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment