From 35856cf7d030e7aa5aa6c22ced5cc10975497632 Mon Sep 17 00:00:00 2001 From: lizw Date: Mon, 29 Nov 2021 10:28:32 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4build=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 4f46b9c..7bdedaa 100644 --- a/build.sh +++ b/build.sh @@ -133,8 +133,12 @@ deployPush() { # 提交文件 echo -e "$echoPrefix cd $pushPath $echoSuffix" cd "$pushPath" - git config user.name bot - git config user.name bot@git.com + if [ -n "$(git config user.name)" ]; then + echo -e "$echoPrefix git config user.name 'bot' $echoSuffix" + git config user.name 'bot' + echo -e "$echoPrefix git config user.name 'bot@git.com' $echoSuffix" + git config user.name 'bot@git.com' + fi echo -e "$echoPrefix git add -A $echoSuffix" git add -A if [ -n "$(git status -s)" ]; then