From ecb721292d82b05ea7062481e165bfa31dca9db7 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Thu, 16 Mar 2023 22:18:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Eupdate=20--local?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd b/cmd index 5ac073bac..b7957bc67 100755 --- a/cmd +++ b/cmd @@ -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