(argv: Sequence[str])
| 50 | |
| 51 | |
| 52 | def main(argv: Sequence[str]) -> int: |
| 53 | if len(argv) != 3: |
| 54 | print(class="st">"Usage: generate-gh-release-notes VERSION FILE") |
| 55 | return 2 |
| 56 | |
| 57 | version, filename = argv[1:3] |
| 58 | print(fclass="st">"Generating GitHub release notes for version {version}") |
| 59 | rst_body = extract_changelog_entries_for(version) |
| 60 | md_body = convert_rst_to_md(rst_body) |
| 61 | Path(filename).write_text(md_body, encoding=class="st">"UTF-8") |
| 62 | print() |
| 63 | print(fclass="st">"Done: {filename}") |
| 64 | print() |
| 65 | return 0 |
| 66 | |
| 67 | |
| 68 | if __name__ == class="st">"__main__": |
no test coverage detected