diff --git a/agent/update_catalog/scripts/run_flow.sh b/agent/update_catalog/scripts/run_flow.sh index e038e38..77eecfc 100755 --- a/agent/update_catalog/scripts/run_flow.sh +++ b/agent/update_catalog/scripts/run_flow.sh @@ -146,28 +146,30 @@ PY # 5) update_docs_file: TO_VERSION의 CUSTOM-README.md에 업그레이드 주의사항 추가 CUSTOM_README_TO_RELATIVE="manifests/helm/$CHART/$TO_VERSION/CUSTOM-README.md" +UPGRADE_DOC_MD="$CHART_OUT_DIR/upgrade_doc.md" + +# generate_upgrade_doc의 markdown 필드를 파일로 뽑는다 — run.py는 --content-file 로만 받는다 +# (다른 Skill과 동일하게 self-contained scripts/update_catalog/ 를 통해 run.py CLI로 호출한다. +# 예전엔 여기서 "$UPDATE_CATALOG_ROOT/src" 를 sys.path 에 넣어 모듈을 직접 import 했는데, +# 그 경로가 애초에 존재한 적이 없어 항상 ModuleNotFoundError 로 죽었다 — 실측 확인.) +python3 -c " +import json +from pathlib import Path +d = json.loads(Path('$UPGRADE_DOC_JSON').read_text()) +Path('$UPGRADE_DOC_MD').write_text(d.get('markdown', '')) +" + +python3 "$UPDATE_CATALOG_ROOT/skills/update_docs_file/scripts/run.py" \ + --repo-path "$CATALOG_ROOT" \ + --docs-file "$CUSTOM_README_TO_RELATIVE" \ + --version "$FROM_VERSION → $TO_VERSION" \ + --content-file "$UPGRADE_DOC_MD" \ + > "$UPDATE_DOCS_JSON" python3 - <