diff options
| author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-16 08:00:32 +0200 |
|---|---|---|
| committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2020-09-16 08:00:32 +0200 |
| commit | 53181fb95d3884cc067d005f37accd92d128bccc (patch) | |
| tree | 6b21bd8e6bdd3b80e21590219331d41f71975df1 /tools/create_changelog.py | |
| parent | 2b0ea8856212b0320238f1c14091a1396039c0a4 (diff) | |
| parent | 1d50a0a9f6691b2081e389bafa1f22d2fb6004ed (diff) | |
Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I114a003e36bbe9eb7452f13c1515e3419648e228
Diffstat (limited to 'tools/create_changelog.py')
| -rw-r--r-- | tools/create_changelog.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/create_changelog.py b/tools/create_changelog.py index 7599cc6b9..8f5ea7ad0 100644 --- a/tools/create_changelog.py +++ b/tools/create_changelog.py @@ -145,7 +145,8 @@ def git_get_sha1s(versions: List[str], pattern: str): command = "git rev-list --reverse --grep '^{}'".format(pattern) command += " {}..{}".format(versions[0], versions[1]) command += " | git cat-file --batch" - command += " | grep -o -E \"^[0-9a-f]{40}\"" + command += " | grep -o -E \"^[0-9a-f]{40} commit\"" + command += " | awk '{print $1}'" print("{}: {}".format(git_command.__name__, command), file=sys.stderr) out_sha1, err = Popen(command, stdout=PIPE, shell=True).communicate() if err: @@ -224,7 +225,9 @@ def create_change_log(versions: List[str]) -> None: def gen_list(d: Dict[str, Dict[str, str]]) -> str: - return "".join(" - [{}] {}\n".format(v["task"], v["title"]) + def clean_task(s): + return s.replace("Fixes: ", "").replace("Task-number: ", "") + return "".join(" - [{}] {}\n".format(clean_task(v["task"]), v["title"]) for _, v in d.items()) |
