Files
void 17217dbeb1 feat: 考试结果页去重与跳课,构建镜像脚本支持国内换源
考试:
- 新增 src/exam-plan.js(纯函数)判定结果页处置:只有本页确实点过
  「提交考试/确定交卷」才算一次空卷交卷,平台恢复的旧结果页先回
  「考试说明页」重进,不再在结果页和课程页之间空转
- 重试也不会好的确定性失败(交卷次数到上限、说明页无「开始考试」、
  答卷页无「提交考试」、结果页反复回退)改为本轮跳过该课继续下一门,
  记录在 S.skippedCourses(sessionStorage),不会停下整轮刷课
- 新一轮开跑时清空 skippedCourses / examEmptySubmits,人工处理后可重试
- 补 dev/tests/exam-test.mjs(npm run test:exam,5 条用例)

构建:
- 新增 scripts/build-docker.mjs/.cmd/.sh(npm run docker:build):
  国内换源、按包版本打标签、构建后自检、--dry-run
- Dockerfile 增加 APT_MIRROR / NPM_REGISTRY 构建参数,
  docker-compose.yml 透传三个 build args,.env.example 补说明
2026-10-29 21:31:45 +08:00

34 lines
1.1 KiB
Batchfile

@echo off
rem ---------------------------------------------------------------
rem This file must stay PURE ASCII and CRLF (see scripts\start-headless.cmd
rem for the full explanation: cmd.exe parses batch files byte-by-byte with
rem the current code page, so multi-byte chars / bare LF corrupt line offsets).
rem All Chinese messages come from the Node script instead.
rem
rem Usage:
rem scripts\build-docker.cmd build with default tags
rem scripts\build-docker.cmd --mirror --check build with CN mirrors, then self-check
rem scripts\build-docker.cmd --help list all options
rem ---------------------------------------------------------------
setlocal
chcp 65001 >nul
cd /d "%~dp0.."
title YunXueTang Assistant - docker build
where node >nul 2>nul
if errorlevel 1 goto no_node
node "scripts\build-docker.mjs" %*
set RC=%ERRORLEVEL%
if "%RC%"=="0" exit /b 0
echo.
echo [exit] code %RC% (0 ok 1 build failed 2 env/args problem)
pause
exit /b %RC%
:no_node
echo [error] node.exe not found. Install Node.js 22+ from https://nodejs.org/
pause
exit /b 2