diff --git a/src/viur_cli/deploy.py b/src/viur_cli/deploy.py index aa93a3d..f7ac070 100644 --- a/src/viur_cli/deploy.py +++ b/src/viur_cli/deploy.py @@ -23,10 +23,8 @@ def deploy(action, name, additional_args): {k: v for k, v in conf.items() if k not in ["version"]} ) - # gcloud only allows for version identifiers following these rules - if not all([ch in (string.ascii_letters + string.digits + "-") for ch in version]): - echo_error(f"version name '{version}' contains invalid characters!") - return + # gcloud only allows for version identifiers in lower-case order and only accepting these characters + version = "".join([c for c in version.lower() if c in string.ascii_lowercase + string.digits + "-"]) # rebuild requirements.txt create_req() diff --git a/src/viur_cli/utils.py b/src/viur_cli/utils.py index 6fdacf8..ab11ae9 100644 --- a/src/viur_cli/utils.py +++ b/src/viur_cli/utils.py @@ -15,6 +15,7 @@ def echo_info(msg): """colored cli feedback""" click.echo(click.style(msg, fg="cyan")) + def replace_vars(string: str, vars: typing.Optional[typing.Dict[str, str]] = None) -> str: """Replaces $(placeholders) in a string by values from a dict until no more values are being replaced. @@ -23,6 +24,9 @@ def replace_vars(string: str, vars: typing.Optional[typing.Dict[str, str]] = Non - day: Current date's day - month: Current date's month - year: Current date's year + - hour: Current date's hour + - minute: Current date's minute + - second: Current date's second """ # set some defaults if vars is None: