Skip to content

Commit

Permalink
Stop using drush launcher, use drush8 for drupal6/7, fixes #2514 (#2720)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Dec 31, 2020
1 parent 900d464 commit 67f99f5
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 37 deletions.
5 changes: 1 addition & 4 deletions cmd/ddev/cmd/dotddev_assets/commands/web/README.txt
@@ -1,7 +1,4 @@
#ddev-generated
Scripts in this directory will be executed inside the web
container. You can copy the example file or just rename it:
`mv drush.example drush`, for example, and it will become
a live command.
Scripts in this directory will be executed inside the web container.

See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/#environment-variables-provided for a list of environment variables that can be used in the scripts.
13 changes: 0 additions & 13 deletions cmd/ddev/cmd/dotddev_assets/commands/web/drush.example

This file was deleted.

8 changes: 0 additions & 8 deletions cmd/ddev/cmd/dotddev_assets/commands/web/reload-nginx.example

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/ddev/cmd/global_dotddev_assets/commands/web/README.txt
@@ -1,7 +1,7 @@
#ddev-generated
Scripts in this directory will be executed inside the web
container. You can copy the example file or just rename it:
`mv drush.example drush`, for example, and it will become
`mv reload-nginx.example reload-nginx`, for example, and "ddev reload-nginx" will become
a live command.

See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/#environment-variables-provided for a list of environment variables that can be used in the scripts.
4 changes: 4 additions & 0 deletions cmd/ddev/cmd/global_dotddev_assets/commands/web/drush
Expand Up @@ -6,4 +6,8 @@
## Example: "ddev drush uli" or "ddev drush sql-cli" or "ddev drush --version"
## ProjectTypes: drupal7,drupal8,drupal9,backdrop

if ! command -v drush >/dev/null; then
echo "drush is not available. You may need to 'ddev composer require drush/drush'"
exit 1
fi
drush "$@"
12 changes: 5 additions & 7 deletions cmd/ddev/cmd/packrd/packed-packr.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion containers/ddev-webserver/Dockerfile
Expand Up @@ -3,7 +3,7 @@
### Build ddev-php-base from ddev-webserver-base
### ddev-php-base is the basic of ddev-php-prod (for DDEV-Live)
### and ddev-webserver-* (For DDEV-Local)
FROM drud/ddev-php-base:v0.7.6 as ddev-webserver-base
FROM drud/ddev-php-base:v0.7.7 as ddev-webserver-base

ENV BACKDROP_DRUSH_VERSION=1.4.0
ENV MKCERT_VERSION=v1.4.6
Expand Down
Expand Up @@ -38,6 +38,10 @@ if [ "$DDEV_PROJECT_TYPE" = "backdrop" ] ; then
mkdir -p ~/.drush/commands && ln -s /var/tmp/backdrop_drush_commands ~/.drush/commands/backdrop
fi

if [ "${DDEV_PROJECT_TYPE}" = "drupal6" ] || [ "${DDEV_PROJECT_TYPE}" = "drupal7" ] ; then
ln -sf /usr/local/bin/drush8 /usr/local/bin/drush
fi

# Change the apache run user to current user/group
printf "\nexport APACHE_RUN_USER=$(id -un)\nexport APACHE_RUN_GROUP=$(id -gn)\n" >>/etc/apache2/envvars

Expand Down
Expand Up @@ -38,6 +38,10 @@ if [ "$DDEV_PROJECT_TYPE" = "backdrop" ] ; then
mkdir -p ~/.drush/commands && ln -s /var/tmp/backdrop_drush_commands ~/.drush/commands/backdrop
fi

if [ "${DDEV_PROJECT_TYPE}" = "drupal6" ] || [ "${DDEV_PROJECT_TYPE}" = "drupal7" ] ; then
ln -sf /usr/local/bin/drush8 /usr/local/bin/drush
fi

# Change the apache run user to current user/group
printf "\nexport APACHE_RUN_USER=$(id -un)\nexport APACHE_RUN_GROUP=$(id -gn)\n" >>/etc/apache2/envvars

Expand Down
2 changes: 0 additions & 2 deletions pkg/ddevapp/ddevapp_test.go
Expand Up @@ -1834,8 +1834,6 @@ func TestDdevExec(t *testing.T) {
case nodeps.AppTypeDrupal6:
fallthrough
case nodeps.AppTypeDrupal7:
fallthrough
case nodeps.AppTypeDrupal8:
out, _, err = app.Exec(&ddevapp.ExecOpts{
Service: "web",
Cmd: "drush status",
Expand Down
2 changes: 1 addition & 1 deletion pkg/version/version.go
Expand Up @@ -40,7 +40,7 @@ var DockerComposeFileFormatVersion = "3.6"
var WebImg = "drud/ddev-webserver"

// WebTag defines the default web image tag for drud dev
var WebTag = "20201227_travis_router_http2_max_header" // Note that this can be overridden by make
var WebTag = "20201230_stop_using_drush_launcher" // Note that this can be overridden by make

// DBImg defines the default db image used for applications.
var DBImg = "drud/ddev-dbserver"
Expand Down

0 comments on commit 67f99f5

Please sign in to comment.