diff --git a/README.md b/README.md index b95ff50de..12120c6a6 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ [![Crates.io](https://img.shields.io/crates/v/openraft.svg)](https://crates.io/crates/openraft) [![docs.rs](https://docs.rs/openraft/badge.svg)](https://docs.rs/openraft) [![guides](https://img.shields.io/badge/guide-%E2%86%97-brightgreen)](https://docs.rs/openraft/latest/openraft/docs/index.html) +[![Discord Chat](https://img.shields.io/discord/1015845055434588200?logo=discord)](https://discord.gg/ZKw3WG7FQ9)
[![CI](https://github.com/datafuselabs/openraft/actions/workflows/ci.yaml/badge.svg)](https://github.com/datafuselabs/openraft/actions/workflows/ci.yaml) ![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue) diff --git a/scripts/build_change_log.py b/scripts/build_change_log.py index 53ef9acb3..5ccc70a03 100755 --- a/scripts/build_change_log.py +++ b/scripts/build_change_log.py @@ -246,11 +246,11 @@ def build_ver_changelog(new_ver, commit="HEAD", since=None): new_ver = new_ver.lstrip('v') new_ver = semantic_version.Version(new_ver) tags = [t for t in tags if t < new_ver] - latest = tags[-1] + latest = 'v' + str(tags[-1]) else: latest = since - chs = changes('v' + str(latest), commit) + chs = changes(latest, commit) chs = norm_changes(chs) lines = [] @@ -340,7 +340,10 @@ def build_ver_changelog_summary(ver): l = re.sub('; \d\d\d\d-\d\d-\d\d$', '', l) # Remove suffix author - l = re.sub('; by [^ ]*$', '.', l) + l = re.sub('; by .*?$', '.', l) + + # Remove redundent "." + l = re.sub('[.][.]$', '.', l) # add indent: l = " - " + l @@ -409,6 +412,8 @@ def load_cargo_version(): if __name__ == "__main__": # Usage: to build change log from git log for the current version. # ./scripts/build_change_log.py + # ./scripts/build_change_log.py v0.8.3 + # ./scripts/build_change_log.py 12345abc new_ver = load_cargo_version()