4NK_template/scripts/agents/versionnage_agent.sh

27 lines
763 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
set -euo pipefail
TARGET_DIR="${1:-.}"
OUTPUT_DIR="${2:-tests/reports/agents}"
mkdir -p "$OUTPUT_DIR"
SUMMARY_FILE="$OUTPUT_DIR/versionnage_agent.md"
echo "# Agent Versionnage" > "$SUMMARY_FILE"
echo >> "$SUMMARY_FILE"
pushd "$TARGET_DIR" >/dev/null
ok=1
for f in CHANGELOG.md TEMPLATE_VERSION; do
if [[ ! -f "$f" ]]; then echo "- Manquant: $f" >> "$SUMMARY_FILE"; ok=0; fi
done
if [[ $ok -eq 1 ]]; then echo "- CHANGELOG et TEMPLATE_VERSION présents." >> "$SUMMARY_FILE"; fi
PROMPT=$(cat <<'EOF'
Décris la procédure dalignement version ↔ changelog ↔ tag git (latest vs wip) et conditions de blocage release.
EOF
)
scripts/agents/ai_prompt.sh "$PROMPT" >> "$SUMMARY_FILE" || true
echo "Rapport: $SUMMARY_FILE"
popd >/dev/null