This commit is contained in:
iouAkira
2021-03-26 16:55:48 +08:00
parent 6bf45c65ec
commit 490d97e2b9
2 changed files with 16 additions and 10 deletions

View File

@@ -6,15 +6,18 @@ if [ -n "$1" ]; then
run_cmd=$1
fi
echo "设定远程仓库地址..."
cd /scripts
git remote set-url origin "$REPO_URL"
git reset --hard
echo "git pull拉取最新代码..."
git -C /scripts pull --rebase
echo "npm install 安装最新依赖"
npm install --prefix /scripts
if [ -f "/scripts/logs/pull.lock" ]; then
echo "存在更新锁定文件跳过git pull操作..."
else
echo "设定远程仓库地址..."
cd /scripts
git remote set-url origin "$REPO_URL"
git reset --hard
echo "git pull拉取最新代码..."
git -C /scripts pull --rebase
echo "npm install 安装最新依赖"
npm install --prefix /scripts
fi
# 默认启动telegram交互机器人的条件
# 确认容器启动时调用的docker_entrypoint.sh