mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-19 18:01:37 +00:00
30 lines
597 B
Bash
Executable File
30 lines
597 B
Bash
Executable File
echo "Updating Vito..."
|
|
|
|
cd /home/vito/vito
|
|
|
|
echo "Pulling changes..."
|
|
git fetch --all
|
|
|
|
echo "Checking out the latest tag..."
|
|
NEW_RELEASE=$(git tag -l "2.*" --sort=-v:refname | head -n 1)
|
|
git checkout "$NEW_RELEASE"
|
|
|
|
git pull origin "$NEW_RELEASE"
|
|
|
|
echo "Installing composer dependencies..."
|
|
composer install --no-dev
|
|
|
|
echo "Running migrations..."
|
|
php artisan migrate --force
|
|
|
|
echo "Optimizing..."
|
|
php artisan optimize:clear
|
|
php artisan optimize
|
|
|
|
echo "Restarting workers..."
|
|
sudo supervisorctl restart worker:*
|
|
|
|
bash scripts/post-update.sh
|
|
|
|
echo "Vito updated successfully to $NEW_RELEASE! 🎉"
|