bin/gen_release_notes.py: do not end "features" with "None"
Currently, the "New features" list unconditionally ends with a "None" point, which makes no sense. The original author probably meant to check whether the file is empty, so remove the else clause, and add the check for emptiness. Cc: mesa-stable Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru> Reviewed-by: Eric Engestrom <eric@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20241>
This commit is contained in:
@@ -282,14 +282,12 @@ def calculate_previous_version(version: str, is_point: bool) -> str:
|
||||
|
||||
def get_features(is_point_release: bool) -> typing.Generator[str, None, None]:
|
||||
p = pathlib.Path(__file__).parent.parent / 'docs' / 'relnotes' / 'new_features.txt'
|
||||
if p.exists():
|
||||
if p.exists() and p.stat().st_size > 0:
|
||||
if is_point_release:
|
||||
print("WARNING: new features being introduced in a point release", file=sys.stderr)
|
||||
with p.open('rt') as f:
|
||||
for line in f:
|
||||
yield line.rstrip()
|
||||
else:
|
||||
yield "None"
|
||||
p.unlink()
|
||||
else:
|
||||
yield "None"
|
||||
|
Reference in New Issue
Block a user