generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
install.yaml
38 lines (34 loc) · 1.39 KB
/
install.yaml
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
36
37
38
name: ddev-browsersync
pre_install_actions:
- |
#ddev-nodisplay
#ddev-description:Check for minimum DDEV requirement (v1.19.3)
if ! ( ddev debug capabilities 2>/dev/null | grep multiple-dockerfiles >/dev/null 2>&1 ) ; then
echo "This add-on requires DDEV v1.19.3 or higher, please upgrade." && exit 2
fi
project_files:
- config.browsersync.yaml
- web-build/Dockerfile.ddev-browsersync
- browser-sync.js
- commands/web/browsersync
- scripts/wp-config-ddev-browsersync.php
- scripts/remove-wordpress-settings.sh
- scripts/setup-wordpress-settings.sh
post_install_actions:
- |
#ddev-nodisplay
#ddev-description:Check for global 'browser-sync.js'
if ( test -f "$HOME/.ddev/commands/web/browsersync" ) ; then
echo "Note: '~/.ddev/commands/web/browsersync' is no longer required and can be safely removed." && exit 0
fi
#ddev-nodisplay
#ddev-description:Remove old 'docker-compose.browsersync.yaml'
if grep "#ddev-generated" $DDEV_APPROOT/.ddev/docker-compose.browsersync.yaml 2>/dev/null; then rm -f "$DDEV_APPROOT/.ddev/docker-compose.browsersync.yaml"; fi
#ddev-description:Install browsersync settings for WordPress if applicable
scripts/setup-wordpress-settings.sh
removal_actions:
- |
#ddev-nodisplay
#ddev-description:Remove browsersync settings for WordPress if applicable
rm -f "${DDEV_APPROOT}/wp-config-ddev-browsersync.php"
scripts/remove-wordpress-settings.sh