feat: update dependency management in gitapply.sh with npm and composer commands
This commit is contained in:
25
gitapply.sh
25
gitapply.sh
@@ -244,7 +244,7 @@ run_remote_update() {
|
|||||||
echo "pending" > "$status_file"
|
echo "pending" > "$status_file"
|
||||||
|
|
||||||
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o BatchMode=yes -i "$SSH_KEY" root@"$node" \
|
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o BatchMode=yes -i "$SSH_KEY" root@"$node" \
|
||||||
'cd /var/www/paymenter && git pull && php artisan view:clear && php artisan cache:clear && systemctl restart php8.3-fpm' \
|
'cd /var/www/paymenter && git pull && npm update && npm upgrade && composer upgrade && php artisan view:clear && php artisan cache:clear && php artisan optimize && systemctl restart php8.3-fpm' \
|
||||||
> "$STATUS_DIR/${node}.log" 2>&1
|
> "$STATUS_DIR/${node}.log" 2>&1
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
@@ -480,6 +480,24 @@ head -3 /tmp/git_output.txt 2>/dev/null | while IFS= read -r line; do
|
|||||||
printf "${NC}\n"
|
printf "${NC}\n"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Update Dependencies
|
||||||
|
task_start "Local: Updating Dependencies"
|
||||||
|
|
||||||
|
printf " ${C3}○${NC} NPM update..."
|
||||||
|
npm update > /dev/null 2>&1 &
|
||||||
|
spinner $! "NPM update"
|
||||||
|
task_done "NPM update completed"
|
||||||
|
|
||||||
|
printf " ${C3}○${NC} NPM upgrade..."
|
||||||
|
npm upgrade > /dev/null 2>&1 &
|
||||||
|
spinner $! "NPM upgrade"
|
||||||
|
task_done "NPM upgrade completed"
|
||||||
|
|
||||||
|
printf " ${C3}○${NC} Composer upgrade..."
|
||||||
|
composer upgrade > /dev/null 2>&1 &
|
||||||
|
spinner $! "Composer upgrade"
|
||||||
|
task_done "Composer upgrade completed"
|
||||||
|
|
||||||
# Clear Caches
|
# Clear Caches
|
||||||
task_start "Local: Clearing Caches"
|
task_start "Local: Clearing Caches"
|
||||||
|
|
||||||
@@ -493,6 +511,11 @@ php artisan cache:clear > /dev/null 2>&1 &
|
|||||||
spinner $! "Application cache"
|
spinner $! "Application cache"
|
||||||
task_done "Application cache cleared"
|
task_done "Application cache cleared"
|
||||||
|
|
||||||
|
printf " ${C3}○${NC} Optimizing..."
|
||||||
|
php artisan optimize > /dev/null 2>&1 &
|
||||||
|
spinner $! "Optimizing"
|
||||||
|
task_done "Optimization completed"
|
||||||
|
|
||||||
# Restart PHP-FPM
|
# Restart PHP-FPM
|
||||||
task_start "Local: Restarting Services"
|
task_start "Local: Restarting Services"
|
||||||
printf " ${C3}○${NC} PHP 8.3 FPM..."
|
printf " ${C3}○${NC} PHP 8.3 FPM..."
|
||||||
|
|||||||
Reference in New Issue
Block a user