Fix CHANGELOG generation to list by PR merged date, not created date

This commit is contained in:
Felix Schütt
2022-12-12 17:25:15 +01:00
parent 0e3369a9d9
commit 9273161c33

View File

@@ -63,7 +63,7 @@ def make_release(version):
raise Exception("could not clone github repo")
# generate changelog
proc = subprocess.Popen(['gh', "search", "prs", "--repo", "wasmerio/wasmer", "--merged", "--limit", "100"], stdout = subprocess.PIPE, cwd = temp_dir.name)
proc = subprocess.Popen(['gh', "search", "prs", "--repo", "wasmerio/wasmer", "--merged", "--limit", "100", "--sort", "updated"], stdout = subprocess.PIPE, cwd = temp_dir.name)
proc.wait()
if proc.returncode != 0:
print(proc.stdout)
@@ -120,7 +120,7 @@ def make_release(version):
for l in changelog:
print(" " + l)
proc = subprocess.Popen(['gh','search', "prs", "--repo", "wasmerio/wasmer", "--merged"], stdout = subprocess.PIPE, cwd = temp_dir.name)
proc = subprocess.Popen(['gh','search', "prs", "--repo", "wasmerio/wasmer", "--merged", "--sort", "updated"], stdout = subprocess.PIPE, cwd = temp_dir.name)
proc.wait()
already_released_str = ""
@@ -170,7 +170,7 @@ def make_release(version):
print(line.rstrip())
raise Exception("could not run git checkout -b release-" + RELEASE_VERSION)
replace(temp_dir.name + "/CHANGELOG.md", "## **Unreleased**", "\r\n".join(changelog))
replace(temp_dir.name + "/CHANGELOG.md", "## **Unreleased**", "\n".join(changelog))
proc = subprocess.Popen(['git','commit', "-am", "Update CHANGELOG"], stdout = subprocess.PIPE, cwd = temp_dir.name)
proc.wait()
@@ -338,7 +338,7 @@ def make_release(version):
print(line.rstrip())
raise Exception("could not pull origin ")
proc = subprocess.Popen(['gh','search', "prs", "--repo", "wasmerio/wasmer", "--merged"], stdout = subprocess.PIPE, cwd = temp_dir.name)
proc = subprocess.Popen(['gh','search', "prs", "--repo", "wasmerio/wasmer", "--merged", "--sort", "updated"], stdout = subprocess.PIPE, cwd = temp_dir.name)
proc.wait()
github_link_line = ""