Skip to content

Commit

Permalink
DCFILE_VERSION -> DCFileVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
galeone committed Jan 29, 2025
1 parent 9added3 commit c4b3e24
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pre_commit_hooks/dcfiles_updated.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ def main():
encoding="utf-8",
) as fp:
for line in fp:
if "DCFILE_VERSION" in line:
result = re.search(r"DCFILE_VERSION = \"v(\d+)\.(\d+)\.(\d+)\"", line)
if "DCFileVersion" in line:
result = re.search(r"DCFileVersion = \"v(\d+)\.(\d+)\.(\d+)\"", line)
if not result:
print("Unable to extract DCFILE_VERSION value", file=sys.stderr)
print("Unable to extract DCFileVersion value", file=sys.stderr)
return 1
version = f"{result.group(1)}.{result.group(2)}.{result.group(3)}"
break
if not version:
print("Unable to find DCFILE_VERSION", file=sys.stderr)
print("Unable to find DCFileVersion", file=sys.stderr)
return 1

for dcfile in sys.argv[1:]:
Expand Down

0 comments on commit c4b3e24

Please sign in to comment.