mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Make _check_tag public
This commit is contained in:
parent
310f8e67dc
commit
66851b28b7
@ -3,7 +3,7 @@ import argparse
|
||||
import os.path as p
|
||||
import re
|
||||
import subprocess
|
||||
from typing import Optional
|
||||
from typing import List, Optional
|
||||
|
||||
# ^ and $ match subline in `multiple\nlines`
|
||||
# \A and \Z match only start and end of the whole string
|
||||
@ -89,7 +89,7 @@ class Git:
|
||||
self.run(f"git rev-list {self.latest_tag}..HEAD --count")
|
||||
)
|
||||
|
||||
def _check_tag(self, value: str):
|
||||
def check_tag(self, value: str):
|
||||
if value == "":
|
||||
return
|
||||
if not self._tag_pattern.match(value):
|
||||
@ -101,7 +101,7 @@ class Git:
|
||||
|
||||
@latest_tag.setter
|
||||
def latest_tag(self, value: str):
|
||||
self._check_tag(value)
|
||||
self.check_tag(value)
|
||||
self._latest_tag = value
|
||||
|
||||
@property
|
||||
@ -110,7 +110,7 @@ class Git:
|
||||
|
||||
@new_tag.setter
|
||||
def new_tag(self, value: str):
|
||||
self._check_tag(value)
|
||||
self.check_tag(value)
|
||||
self._new_tag = value
|
||||
|
||||
@property
|
||||
@ -122,3 +122,6 @@ class Git:
|
||||
|
||||
version = self.latest_tag.split("-", maxsplit=1)[0]
|
||||
return int(version.split(".")[-1]) + self.commits_since_tag
|
||||
|
||||
def get_tags(self) -> List[str]:
|
||||
return self.run("git tag").split()
|
||||
|
Loading…
Reference in New Issue
Block a user