Files
llm-intelligence/scripts/verify_phase3_official_report_paths_test.sh

22 lines
1.1 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"
source scripts/report_utils.sh
LATEST_MD="$(find "$(report_output_dir)" -maxdepth 1 -type f -name 'daily_report_*.md' | sort | tail -n 1)"
LATEST_HTML="$(find "$(report_html_dir)" -maxdepth 1 -type f -name 'daily_report_*.html' | sort | tail -n 1)"
LATEST_ARCHIVE_MD="$(find "$(report_output_dir)" -mindepth 3 -maxdepth 3 -type f -name 'daily_report_*.md' | sort | tail -n 1)"
LATEST_ARCHIVE_HTML="$(find "$(report_output_dir)" -mindepth 3 -maxdepth 3 -type f -name 'daily_report_*.html' | sort | tail -n 1)"
[[ -n "$LATEST_MD" && -f "$LATEST_MD" ]]
grep -q '数据质量摘要' "$LATEST_MD"
[[ -n "$LATEST_HTML" && -f "$LATEST_HTML" ]]
[[ -n "$LATEST_ARCHIVE_MD" && -f "$LATEST_ARCHIVE_MD" ]]
[[ -n "$LATEST_ARCHIVE_HTML" && -f "$LATEST_ARCHIVE_HTML" ]]
grep -q 'reports/ad_hoc/' scripts/generate_daily_report_test.go
grep -q 'REPORT_IS_OFFICIAL_DAILY="false"' scripts/run_real_pipeline.sh
grep -q 'REPORT_IS_OFFICIAL_DAILY="false"' scripts/rebuild_historical_report.sh