Skip to content

Commit

Permalink
chore: improve changelog generation
Browse files Browse the repository at this point in the history
  • Loading branch information
copernico committed Oct 14, 2020
1 parent 9de1222 commit 3a490a6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/changelog-gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ def render_changelog_header():
print("<a name=\"" + curr_tag + "\"></a>")
print("## [" + curr_tag + "](https://github.com/" + project_slug + "/compare/" + prev_tag + "..." + curr_tag +")")

def render_link_to_detailed_changes():
since = get_commit_for_second_last_tag()
until = get_commit_for_last_tag()

prev_tag = tag_at_commit(since)
curr_tag = tag_at_commit(until)

print("\n\n:mag: [View detailed changes since the previous release]" + "(https://github.com/" + project_slug + "/compare/" + prev_tag + "..." + curr_tag +")")

def render_changelog(log):
changes_by_type = dict()

Expand All @@ -99,8 +108,9 @@ def main(args):
else:
log = get_commits()

render_changelog_header()
# render_changelog_header()
render_changelog(log)
render_link_to_detailed_changes()


if __name__ == "__main__":
Expand Down

0 comments on commit 3a490a6

Please sign in to comment.