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

View File

@@ -112,6 +112,9 @@ EOF
fi
echo "暂停更新配置,不要尝试删掉这个文件,你的容器可能会起不来"
echo '' >/scripts/logs/pull.lock
echo "定义定时任务合并处理用到的文件路径..."
defaultListFile="/scripts/docker/$DEFAULT_LIST_FILE"
echo "默认文件定时任务文件路径为 ${defaultListFile}"

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