Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Change release script to update debian changelog for RCs #10465

Merged
merged 3 commits into from
Jul 27, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions scripts-dev/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,24 @@ def run():
# Generate changelogs
subprocess.run("python3 -m towncrier", shell=True)

# Generate debian changelogs if its not an RC.
if not rc:
subprocess.run(
f'dch -M -v {new_version} "New synapse release {new_version}."', shell=True
)
subprocess.run('dch -M -r -D stable ""', shell=True)
# Generate debian changelogs
assert not parsed_new_version.is_devrelease
assert not parsed_new_version.is_postrelease
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like these checks should be higher up, since we also probably don't want to go through all of the previous steps if the release isn't either an RC or a stable release.


if parsed_new_version.pre is not None:
# If this is an RC then we need to coerce the version string to match
# Debian norms, e.g. 1.39.0rc2 gets converted to 1.39.0~rc2.
base_ver = parsed_new_version.base_version
pre_type, pre_num = parsed_new_version.pre
debian_version = f"{base_ver}~{pre_type}{pre_num}"
else:
debian_version = new_version

subprocess.run(
f'dch -M -v {debian_version} "New synapse release {debian_version}."',
shell=True,
)
subprocess.run('dch -M -r -D stable ""', shell=True)

# Show the user the changes and ask if they want to edit the change log.
repo.git.add("-u")
Expand Down