From cc9f0aaf80b325c760018d96a083730d65dddb0d Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Wed, 30 Aug 2023 23:56:25 +0200 Subject: [PATCH] Escape core version [ci] (#99364) --- .github/workflows/ci.yaml | 2 +- script/version_bump.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3e4772cfbbf..bf6ba38ea91 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,7 +36,7 @@ env: CACHE_VERSION: 5 PIP_CACHE_VERSION: 4 MYPY_CACHE_VERSION: 4 - HA_SHORT_VERSION: 2023.10 + HA_SHORT_VERSION: "2023.10" DEFAULT_PYTHON: "3.11" ALL_PYTHON_VERSIONS: "['3.11']" # 10.3 is the oldest supported version diff --git a/script/version_bump.py b/script/version_bump.py index 4c4f8a97f09..5e383ab7d4b 100755 --- a/script/version_bump.py +++ b/script/version_bump.py @@ -135,8 +135,8 @@ def write_ci_workflow(version: Version) -> None: short_version = ".".join(str(version).split(".", maxsplit=2)[:2]) content = re.sub( - r"(\n\W+HA_SHORT_VERSION: )\d{4}\.\d{1,2}\n", - f"\\g<1>{short_version}\n", + r"(\n\W+HA_SHORT_VERSION: )\"\d{4}\.\d{1,2}\"\n", + f'\\g<1>"{short_version}"\n', content, count=1, )