summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorKonstantin Kharlamov <Hi-Angel@yandex.ru>2022-12-08 22:05:03 +0300
committerEric Engestrom <eric@engestrom.ch>2023-01-11 17:44:20 +0000
commit1e6aa5ebab4835500c2e8433c450759f2c433040 (patch)
tree4fe076f882da45909b7770fd7249d3e90dc833da /bin
parent2aff63333279b64adb8e03331da285f5be337d4c (diff)
downloadmesa-1e6aa5ebab4835500c2e8433c450759f2c433040.tar.gz
mesa-1e6aa5ebab4835500c2e8433c450759f2c433040.tar.bz2
mesa-1e6aa5ebab4835500c2e8433c450759f2c433040.zip
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> (cherry picked from commit bd807eecd16eb308e121ff6d51210edee8635083)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gen_release_notes.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/gen_release_notes.py b/bin/gen_release_notes.py
index 2f6750fc0cf..b323fc24046 100755
--- a/bin/gen_release_notes.py
+++ b/bin/gen_release_notes.py
@@ -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"