-
Notifications
You must be signed in to change notification settings - Fork 10
/
update.sh
49 lines (42 loc) · 1.03 KB
/
update.sh
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
#!/bin/bash
# Function to print success message
print_success() {
echo -e "\e[32m$1 \e[0m" # Green text
}
# Function to print error message
print_error() {
echo -e "\e[31m$1 \e[0m" # Red text
}
# Run Composer Install
composer install
if [ $? -eq 0 ]; then
print_success "Composer install completed successfully."
else
print_error "Error occurred during 'composer install'."
exit 1
fi
# Run Composer Dump-Autoload
composer dump-autoload
if [ $? -eq 0 ]; then
print_success "Composer dump-autoload completed successfully."
else
print_error "Error occurred during 'composer dump-autoload'."
exit 1
fi
# Run NPM Install
npm install
if [ $? -eq 0 ]; then
print_success "NPM install completed successfully."
else
print_error "Error occurred during 'npm install'."
exit 1
fi
# Run NPM Run Build
npm run build
if [ $? -eq 0 ]; then
print_success "NPM run build completed successfully."
else
print_error "Error occurred during 'npm run build'."
exit 1
fi
echo "All build tasks completed successfully!"