-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·117 lines (85 loc) · 2.56 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·117 lines (85 loc) · 2.56 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/usr/bin/env bash
# Does all of the initial setup for the project
# Begin Setup
clear
echo ""
read -e -p "This will completely reset the local install. Are you sure? (y/n): " option
if [ $option = "n" ]; then
exit
fi
echo ""
echo "================================================================="
echo "Beginning Scaffolding"
echo "================================================================="
echo ""
if [ -d vendor ]; then
echo "Removing 'vendor' Directory..."
rm -rf vendor
echo -e "Done!\n"
fi
if [ -d node_modules ]; then
echo "Removing 'node_modules' Directory..."
rm -rf node_modules
echo -e "Done!\n"
fi
if [ -e .env ]; then
rm -rf .env.original
echo "Backing up your '.env' file to '.env.original'..."
mv .env .env.original
echo -e "Done!\n"
fi
echo "Creating Fresh '.env' File..."
cp .env.example .env
echo -e "Done!\n"
echo ""
echo "================================================================="
echo "Starting Docker Containers"
echo "================================================================="
./vessel start
echo "================================================================="
echo "Installing JS and CSS Dependencies"
echo "================================================================="
./vessel yarn install
if [ $? -eq 0 ];then
echo -e "\nDone!\n"
else
echo -e "\nSomething went wrong, Exiting!\n"
exit 1
fi
echo ""
echo "================================================================="
echo "Installing Composer Dependencies"
echo "================================================================="
./vessel composer install --optimize-autoloader
if [ $? -eq 0 ];then
echo -e "\nDone!\n"
else
echo -e "\nSomething went wrong, Exiting!\n"
exit 1
fi
echo "================================================================="
echo "Compiling Frontend Assets"
echo "================================================================="
./vessel yarn run dev
if [ $? -eq 0 ];then
echo -e "\nDone!\n"
else
echo -e "\nSomething went wrong, Exiting!\n"
exit 1
fi
echo "================================================================="
echo "Generating Application Key"
echo "================================================================="
echo ""
./vessel artisan key:generate
if [ $? -eq 0 ];then
echo -e "\nDone!\n"
else
echo -e "\nSomething went wrong, Exiting!\n"
exit 1
fi
echo ""
echo "================================================================="
echo "Scaffolding Complete!"
echo "================================================================="
echo ""