generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathquickstart
executable file
·35 lines (30 loc) · 1.12 KB
/
quickstart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
#ddev-generated
## Description: Quickstart command that setup the ddev-contrib-drupal addon for module development.
## Usage: quickstart
## Example: ddev quickstart
set -e -o pipefail
ddev restart
DDEV_DRUPAL_CORE=$(ddev exec 'echo "${DRUPAL_CORE/^/}"')
# We have to do this check here, otherwise ddev poser will fail if the wrong PHP version for the wrong core is setup.
if [ "$DDEV_DRUPAL_CORE" -ge "11" ] ; then
echo -e "\033[0;33m[warning] Drupal ${DDEV_DRUPAL_CORE} requires PHP 8.3+, configuring and restarting ddev.\033[0m"
ddev config --php-version=8.3
ddev restart
fi
# Continue running all necessary commands
ddev poser
ddev mutagen sync
ddev symlink-project
ddev mutagen sync
cp .ddev/config.yaml .ddev/cmp.config.yaml
# Allow ddev to further change necessary defaults based on detected core.
ddev config --update
ddev mutagen sync
if ! ddev exec -- cmp -s .ddev/config.yaml .ddev/cmp.config.yaml > /dev/null 2>&1; then
echo -e "\033[0;33m[warning] config.yaml changed, restarting ddev.\033[0m"
ddev restart
fi
ddev exec -- rm .ddev/cmp.config.yaml
ddev exec "cd web/core && yarn install"
ddev mutagen sync