Module: Mesa
Branch: main
Commit: 13af9975670bdd6adb051f5428bad83ae71029a7
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=13af9975670bdd6adb051f5428bad83ae71029a7

Author: Eric Engestrom <[email protected]>
Date:   Thu Dec 29 23:39:48 2022 +0000

gen_release_notes: allow using the script from another checkout

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20459>

---

 bin/gen_release_notes.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/gen_release_notes.py b/bin/gen_release_notes.py
index 3ade3d93c8a..4416138915d 100755
--- a/bin/gen_release_notes.py
+++ b/bin/gen_release_notes.py
@@ -298,7 +298,7 @@ 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'
+    p = pathlib.Path('docs') / 'relnotes' / 'new_features.txt'
     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)
@@ -311,7 +311,7 @@ def get_features(is_point_release: bool) -> 
typing.Generator[str, None, None]:
 
 
 async def main() -> None:
-    v = pathlib.Path(__file__).parent.parent / 'VERSION'
+    v = pathlib.Path('VERSION')
     with v.open('rt') as f:
         raw_version = f.read().strip()
     is_point_release = '-rc' not in raw_version
@@ -328,7 +328,7 @@ async def main() -> None:
         gather_bugs(previous_version),
     )
 
-    final = pathlib.Path(__file__).parent.parent / 'docs' / 'relnotes' / 
f'{this_version}.rst'
+    final = pathlib.Path('docs') / 'relnotes' / f'{this_version}.rst'
     with final.open('wt') as f:
         try:
             f.write(TEMPLATE.render(

Reply via email to