From 02ed509a7f7d8d9c991a4549e5cbe00fb0d24b95 Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 29 Mar 2021 11:40:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dgit=5Fpull=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E5=AF=BC=E8=87=B4=E6=97=A0=E6=B3=95=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0cron?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/Dockerfile | 2 +- shell/git_pull.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index df38b3ec..17e4ba89 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -75,7 +75,7 @@ RUN cd ${QL_DIR} \ && yarn build-back \ && git clone -b ${QL_SCRIPTS_BRANCH} ${QL_SCRIPTS_URL} ${QL_DIR}/scripts \ && cd ${QL_DIR}/scripts \ - && npm install \ + && npm install --no-save \ && npm install -g pm2 \ && rm -rf /root/.npm ENTRYPOINT ["entrypoint"] \ No newline at end of file diff --git a/shell/git_pull.sh b/shell/git_pull.sh index b3e90aad..fb73ed6f 100755 --- a/shell/git_pull.sh +++ b/shell/git_pull.sh @@ -56,6 +56,8 @@ function Update_Cron { function Git_PullShell { echo -e "更新shell...\n" cd ${ShellDir} + git config --global user.email "noreplay@githb.com" + git config --global user.name "noreplay" git fetch --all git stash git pull @@ -89,6 +91,8 @@ function Git_PullScripts { echo -e "更新scripts...\n" cd ${ScriptsDir} git fetch --all + git config --global user.email "noreplay@githb.com" + git config --global user.name "noreplay" git rm -f --ignore-unmatch i-chenzhe* git rm -f --ignore-unmatch moposmall* git rm -f --ignore-unmatch qq34347476* @@ -152,10 +156,10 @@ function Notify_Version { function Npm_InstallSub { if [ -n "${isTermux}" ] then - npm install --no-bin-links || npm install --no-bin-links --registry=https://registry.npm.taobao.org + npm install --no-bin-links --no-save || npm install --no-save --no-bin-links --registry=https://registry.npm.taobao.org elif ! type yarn >/dev/null 2>&1 then - npm install || npm install --registry=https://registry.npm.taobao.org + npm install --no-save || npm install --no-save --registry=https://registry.npm.taobao.org else echo -e "检测到本机安装了 yarn,使用 yarn 替代 npm...\n" yarn install || yarn install --registry=https://registry.npm.taobao.org