mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Add validate_version function to version_helper.py
This commit is contained in:
parent
5212ff0146
commit
93cfc4d590
@ -138,6 +138,14 @@ class VersionType:
|
||||
VALID = (TESTING, PRESTABLE, STABLE, LTS)
|
||||
|
||||
|
||||
def validate_version(version: str):
|
||||
parts = version.split(".")
|
||||
if len(parts) != 4:
|
||||
raise ValueError(f"{version} does not contain 4 parts")
|
||||
for part in parts:
|
||||
int(part)
|
||||
|
||||
|
||||
def get_abs_path(path: str) -> str:
|
||||
return p.abspath(p.join(git.root, path))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user