新增update --local

This commit is contained in:
kuaifan 2023-03-16 22:18:01 +08:00
parent 5a83568141
commit ecb721292d

10
cmd
View File

@ -324,10 +324,12 @@ if [ $# -gt 0 ]; then
elif [[ "$1" == "update" ]]; then elif [[ "$1" == "update" ]]; then
shift 1 shift 1
run_mysql backup run_mysql backup
git fetch --all if [[ -z "$(arg_get local)" ]]; then
git reset --hard origin/$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') git fetch --all
git pull git reset --hard origin/$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
run_exec php "composer update" git pull
run_exec php "composer update"
fi
run_exec php "php artisan migrate" run_exec php "php artisan migrate"
restart_php restart_php
$COMPOSE up -d $COMPOSE up -d