mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
Change regexp to be more strict
This commit is contained in:
parent
d2cbc5af40
commit
b39dfc9ba6
@ -5,9 +5,13 @@ 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}$"
|
||||
# ^ and $ match subline in `multiple\nlines`
|
||||
# \A and \Z match only start and end of the whole string
|
||||
RELEASE_BRANCH_REGEXP = r"\A\d+[.]\d+\Z"
|
||||
TAG_REGEXP = (
|
||||
r"\Av\d{2}[.][1-9]\d*[.][1-9]\d*[.][1-9]\d*-(testing|prestable|stable|lts)\Z"
|
||||
)
|
||||
SHA_REGEXP = r"\A([0-9]|[a-f]){40}\Z"
|
||||
|
||||
|
||||
# Py 3.8 removeprefix and removesuffix
|
||||
|
Loading…
Reference in New Issue
Block a user