新增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
shift 1
run_mysql backup
git fetch --all
git reset --hard origin/$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
git pull
run_exec php "composer update"
if [[ -z "$(arg_get local)" ]]; then
git fetch --all
git reset --hard origin/$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
git pull
run_exec php "composer update"
fi
run_exec php "php artisan migrate"
restart_php
$COMPOSE up -d