_refresh_bbp_v05.py 834 B

123456789101112131415161718192021222324252627282930
  1. # -*- coding: utf-8 -*-
  2. """仅重新生成 系统集成/运营改善 两份 V0.5 蓝图(1.3 方案设计补充方式丙)并覆盖部署。"""
  3. from __future__ import annotations
  4. import shutil
  5. import sys
  6. from pathlib import Path
  7. HERE = Path(__file__).resolve().parent
  8. sys.path.insert(0, str(HERE))
  9. from docx import Document # noqa: E402
  10. from _refresh_release_v05_docs import JOBS, TARGET, bump_version, generate # noqa: E402
  11. def main():
  12. for key, kind, staging_name, final_name, note in JOBS:
  13. if kind != "bbp":
  14. continue
  15. src = generate(kind, key, staging_name)
  16. doc = Document(str(src))
  17. bump_version(doc, note)
  18. doc.save(str(src))
  19. shutil.copy2(str(src), str(TARGET / final_name))
  20. print("OK", final_name, flush=True)
  21. if __name__ == "__main__":
  22. main()