()
| 61 | |
| 62 | # Get version from command line or __init__.py |
| 63 | def get_version(): |
| 64 | # If version was provided via command line, use that |
| 65 | if version is not None: |
| 66 | return version |
| 67 | |
| 68 | # Otherwise, fall back to reading from __init__.py |
| 69 | import re |
| 70 | |
| 71 | version_file = os.path.join(project_root, "mirix", "__init__.py") |
| 72 | with open(version_file, "r", encoding="utf-8") as version_f: |
| 73 | version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_f.read(), re.M) |
| 74 | if version_match: |
| 75 | return version_match.group(1) |
| 76 | raise RuntimeError("Unable to find version string.") |
| 77 | |
| 78 | |
| 79 | # Server dependencies (comprehensive) |
no test coverage detected