fix(docker): fix gradle quickstart version parsing (#7614)

This commit is contained in:
Harshal Sheth 2023-03-17 12:10:05 -04:00 committed by GitHub
parent 41d4c0b074
commit 14ecba1e62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 14 deletions

View File

@ -11,7 +11,7 @@ import tempfile
import time import time
from enum import Enum from enum import Enum
from pathlib import Path from pathlib import Path
from typing import Dict, List, NoReturn, Optional from typing import Dict, List, Optional
import click import click
import click_spinner import click_spinner
@ -87,18 +87,6 @@ def docker() -> None:
pass pass
def _print_issue_list_and_exit(
issues: List[str], header: str, footer: Optional[str] = None
) -> NoReturn:
click.secho(header, fg="bright_red")
for issue in issues:
click.echo(f"- {issue}")
if footer:
click.echo()
click.echo(footer)
sys.exit(1)
@docker.command() @docker.command()
@upgrade.check_upgrade @upgrade.check_upgrade
@telemetry.with_telemetry() @telemetry.with_telemetry()

View File

@ -29,7 +29,7 @@ def _is_it_a_version(version: str) -> bool:
:param version: The string to check. :param version: The string to check.
:return: True if the string is a valid version, False otherwise. :return: True if the string is a valid version, False otherwise.
""" """
return re.match(r"v?\d+\.\d+(\.\d+)?", version) is not None return re.match(r"^v?\d+\.\d+(\.\d+)?$", version) is not None
class QuickstartVersionMappingConfig(BaseModel): class QuickstartVersionMappingConfig(BaseModel):