入库 4 个验收脚本(play-verify/play-smoke/play-daily-check/img-process), play-verify 新增 markdown 报告生成和论坛发布功能。 同时完成但不在 git 跟踪范围的变更: - ~/bin/session-end(会话收尾脚本) - ~/bin/play-add-plugin(交互式添加插件) - staging-watcher systemd user service - cron 自动清理 test-results Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
624 B
Bash
Executable file
22 lines
624 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# play-daily-check — 每日自动巡检 play.wenpai.net
|
|
# 正常静默,异常通知用户
|
|
|
|
LOG="$HOME/.local/share/play-check.log"
|
|
mkdir -p "$(dirname "$LOG")"
|
|
|
|
result=$(bash ~/scripts/play-smoke --all 2>&1)
|
|
exit_code=$?
|
|
timestamp=$(date -Iseconds)
|
|
|
|
echo "[$timestamp] exit=$exit_code" >> "$LOG"
|
|
|
|
if [ "$exit_code" -ne 0 ]; then
|
|
# 提取失败项
|
|
failures=$(echo "$result" | grep '\[✗\]' || true)
|
|
source ~/bin/vm-msg.sh 2>/dev/null || true
|
|
vm-say "[play 巡检异常] $failures" 2>/dev/null || true
|
|
echo "[$timestamp] FAIL: $failures" >> "$LOG"
|
|
else
|
|
echo "[$timestamp] OK" >> "$LOG"
|
|
fi
|