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