()
| 229 | |
| 230 | |
| 231 | def main(): |
| 232 | if not os.path.exists('CHANGELOG.md'): |
| 233 | sys.exit("Tool must be run from the root of a source checkout.") |
| 234 | newconf = read_config() |
| 235 | prev_tag = get_prev_release_tag(newconf.version) |
| 236 | print("Creating changelog YAML entries for dependency updates since git tag %s" % prev_tag) |
| 237 | try: |
| 238 | gitlog_lines = get_gitlog_lines(newconf.user, prev_tag) |
| 239 | entries = parse_gitlog_lines(gitlog_lines, author=newconf.user) |
| 240 | if entries: |
| 241 | deduped = dedupe_entries(entries) |
| 242 | sorted_entries = sort_entries(deduped) |
| 243 | count = write_changelog_yaml(sorted_entries) |
| 244 | print(f"Successfully created {count} changelog YAML entries") |
| 245 | else: |
| 246 | print("No changes found for version %s" % newconf.version.dot) |
| 247 | print("Done") |
| 248 | except subprocess.CalledProcessError: |
| 249 | print("Error running git log - check your --version") |
| 250 | sys.exit(1) |
| 251 | |
| 252 | |
| 253 | if __name__ == '__main__': |
no test coverage detected
searching dependent graphs…