mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Add release_branch checker
This commit is contained in:
parent
0f1565a3a2
commit
d2a8cff508
@ -5,6 +5,7 @@ import re
|
||||
import subprocess
|
||||
from typing import Optional
|
||||
|
||||
RELEASE_BRANCH_REGEXP = r"^\d+[.]\d+$"
|
||||
TAG_REGEXP = r"^v\d{2}[.][1-9]\d*[.][1-9]\d*[.][1-9]\d*-(testing|prestable|stable|lts)$"
|
||||
SHA_REGEXP = r"^([0-9]|[a-f]){40}$"
|
||||
|
||||
@ -31,6 +32,13 @@ def commit(name: str):
|
||||
return name
|
||||
|
||||
|
||||
def release_branch(name: str):
|
||||
r = re.compile(RELEASE_BRANCH_REGEXP)
|
||||
if not r.match(name):
|
||||
raise argparse.ArgumentTypeError("release branch should be as 12.1")
|
||||
return name
|
||||
|
||||
|
||||
class Runner:
|
||||
"""lightweight check_output wrapper with stripping last NEW_LINE"""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user