aco/tests: add test for GFX10 0x3f bug
[mesa.git] / bin / post_version.py
index 67eec783e49cc0bb6084d3772f8ca98cff15a722..359cbd9012cc177fb5428eddbac9f4d20abaf01f 100755 (executable)
@@ -27,17 +27,21 @@ import subprocess
 
 
 def update_release_notes(version: str) -> None:
-    p = pathlib.Path(__file__).parent.parent / 'docs' / 'relnotes.rst'
+    p = pathlib.Path('docs') / 'relnotes.rst'
 
     with open(p, 'r') as f:
         relnotes = f.readlines()
 
     new_relnotes = []
     first_list = True
+    second_list = True
     for line in relnotes:
         if first_list and line.startswith('-'):
             first_list = False
-            new_relnotes.append(f'- `{version} release notes <relnotes/{version}.rst>`__\n')
+            new_relnotes.append(f'-  :doc:`{version} release notes <relnotes/{version}>`\n')
+        if not first_list and second_list and line.startswith('   relnotes/'):
+            second_list = False
+            new_relnotes.append(f'   relnotes/{version}\n')
         new_relnotes.append(line)
 
     with open(p, 'w') as f:
@@ -48,7 +52,7 @@ def update_release_notes(version: str) -> None:
 
 
 def update_calendar(version: str) -> None:
-    p = pathlib.Path(__file__).parent.parent / 'docs' / 'release-calendar.rst'
+    p = pathlib.Path('docs') / 'release-calendar.rst'
 
     with open(p, 'r') as f:
         calendar = f.readlines()
@@ -84,10 +88,9 @@ def main() -> None:
     update_calendar(args.version)
     done = 'update calendar'
 
-    if not is_release_candidate(args.version):
-        update_index(args.version)
+    if 'rc' not in args.version:
         update_release_notes(args.version)
-        done += ', add news item, and link releases notes'
+        done += ' and link releases notes'
 
     subprocess.run(['git', 'commit', '-m',
                     f'docs: {done} for {args.version}'])