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

Stop using drush launcher, use drush8 for drupal6/7, fixes #2514 #2720

Merged
merged 3 commits into from Dec 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.

This file was deleted.

@@ -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