fix(core): 引入 URL 时间戳动态参数实现 GitHub Raw CDN 缓存物理穿透,彻底消除新版发布后的 404 假死与 OTA 获取延迟问题

This commit is contained in:
hotyue
2026-06-03 04:59:39 +00:00
parent 3e863285d4
commit 827381dd7a
4 changed files with 6 additions and 23 deletions

View File

@@ -17,7 +17,7 @@ MODULES=(
# 1. 串行拉取子模块资产
for mod in "${MODULES[@]}"; do
curl -fsSL --connect-timeout 10 --retry 3 "${REPO_RAW_URL}/install/${mod}" -o "${SECURE_TMP}/${mod}"
curl -fsSL --connect-timeout 10 --retry 3 "${REPO_RAW_URL}/install/${mod}?t=$(date +%s)" -o "${SECURE_TMP}/${mod}"
if [ ! -s "${SECURE_TMP}/${mod}" ]; then
echo -e "\033[31m❌ 致命错误:依赖模块 [${mod}] 装载失败!\033[0m"
exit 1

View File

@@ -14,7 +14,7 @@ MODULES=(
)
for mod in "${MODULES[@]}"; do
curl -fsSL --connect-timeout 10 --retry 3 "${REPO_RAW_URL}/install/${mod}" -o "${SECURE_TMP}/${mod}"
curl -fsSL --connect-timeout 10 --retry 3 "${REPO_RAW_URL}/install/${mod}?t=$(date +%s)" -o "${SECURE_TMP}/${mod}"
if [ ! -s "${SECURE_TMP}/${mod}" ]; then
echo -e "\033[31m❌ 致命错误:中枢依赖模块 [${mod}] 装载失败!\033[0m"
exit 1