Commit e1630391 authored by comfyanonymous's avatar comfyanonymous
Browse files

Allow version names like v0.0.1 for the FrontendManager.

parent 99458e8a
...@@ -123,7 +123,7 @@ class FrontendManager: ...@@ -123,7 +123,7 @@ class FrontendManager:
Raises: Raises:
argparse.ArgumentTypeError: If the version string is invalid. argparse.ArgumentTypeError: If the version string is invalid.
""" """
VERSION_PATTERN = r"^([a-zA-Z0-9][a-zA-Z0-9-]{0,38})/([a-zA-Z0-9_.-]+)@(\d+\.\d+\.\d+|latest)$" VERSION_PATTERN = r"^([a-zA-Z0-9][a-zA-Z0-9-]{0,38})/([a-zA-Z0-9_.-]+)@(v?\d+\.\d+\.\d+|latest)$"
match_result = re.match(VERSION_PATTERN, value) match_result = re.match(VERSION_PATTERN, value)
if match_result is None: if match_result is None:
raise argparse.ArgumentTypeError(f"Invalid version string: {value}") raise argparse.ArgumentTypeError(f"Invalid version string: {value}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment