Skip to content

Commit

Permalink
TOOLS/gen-interface-changes: small usability improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
sfan5 committed Sep 23, 2024
1 parent 883a45f commit 5e9e756
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions TOOLS/gen-interface-changes.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,14 @@ def add_new_entries(docs_dir, out, git):

ver_line = " --- mpv 0." + major_version + ".0 ---"
next_ver_line = " --- mpv 0." + str(int(major_version) + 1) + ".0 ---"
found = False
with open(interface_changes, "w", newline="\n") as f:
for line in lines:
if line == ver_line:
f.write(next_ver_line + "\n")
f.write(line + "\n")
if line == ver_line:
add_new_entries(docs_dir, f, git)
found = True
if not found:
print(f"Nothing changed! The following line was not found:\n{ver_line}")

0 comments on commit 5e9e756

Please sign in to comment.