-
Notifications
You must be signed in to change notification settings - Fork 9
/
install.yaml
84 lines (77 loc) · 2.18 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: ddev-viteserve
pre_install_actions:
- |
#ddev-nodisplay
#ddev-description:Check DDEV version
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
- |
#ddev-nodisplay
#ddev-description:Pre-upgrade for older versions of add-on
if [ -f $HOME/.ddev/command/web/vite-serve ]; then
rm $HOME/.ddev/command/web/vite-serve
fi
for file in \
docker-compose.viteserve.yaml \
web-build/Dockerfile.ddev-viteserve \
viteserve/vite-test-listener \
viteserve/build-dotenv.sh \
commands/web/vite-serve; do
if [ -f $file ]; then
if ! grep "#ddev-generated" $file; then
echo "remove old style file $file"
rm $file
fi
fi
done
project_files:
- docker-compose.viteserve.yaml
- web-build/Dockerfile.ddev-viteserve
- viteserve/vite-test-listener
- viteserve/build-dotenv.sh
- viteserve/build-dotenv1.sh
- viteserve/build-dotenv2.sh
- viteserve/build-dotenv3.sh
- commands/web/vite-serve
post_install_actions:
- |
#ddev-description:Run build-dotenv1.sh
ddev exec .ddev/viteserve/build-dotenv1.sh
- |
#ddev-description:Run build-dotenv2.sh
ddev exec .ddev/viteserve/build-dotenv2.sh
- |
#ddev-description:Run build-dotenv3.sh
ddev exec .ddev/viteserve/build-dotenv3.sh
# post_install_actions:
# - ddev exec .ddev/viteserve/build-dotenv.sh
# - |
# #ddev-nodisplay
# # cd .ddev
# if [ -f .allow-upgrade ]; then
# if grep ask .allow-upgrade >/dev/null ; then
# read replace
# if [ "$replace" = "y" ]; then
# echo "true" >.allow-upgrade
# else
# echo "false" >.allow-upgrade
# fi
# fi
# fi
# - |
# #ddev-nodisplay
# # cd .ddev
# if [ -f .allow-upgrade ]; then
# if grep "true" .allow-upgrade >/dev/null ; then
# if [ -f .env ]; then
# sed -i.bak '/^# start vite/,/^\# end vite/d;' .env
# cat .env-frag >>.env
# echo ".env updated to:"
# cat .env
# else
# cp .env-frag .env
# fi
# rm .env-frag
# fi
# fi