From 752a4b9d2ca7dacfc3df3f431e3e3f2e425042d2 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Fri, 21 May 2021 19:31:04 +0200 Subject: [PATCH] Fix version bump script (#50932) --- script/version_bump.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/script/version_bump.py b/script/version_bump.py index f3ed5e99c55..5f1988f3c26 100755 --- a/script/version_bump.py +++ b/script/version_bump.py @@ -106,9 +106,15 @@ def write_version(version): major, minor, patch = str(version).split(".", 2) - content = re.sub("MAJOR_VERSION = .*\n", f"MAJOR_VERSION = {major}\n", content) - content = re.sub("MINOR_VERSION = .*\n", f"MINOR_VERSION = {minor}\n", content) - content = re.sub("PATCH_VERSION = .*\n", f'PATCH_VERSION = "{patch}"\n', content) + content = re.sub( + "MAJOR_VERSION: Final = .*\n", f"MAJOR_VERSION: Final = {major}\n", content + ) + content = re.sub( + "MINOR_VERSION: Final = .*\n", f"MINOR_VERSION: Final = {minor}\n", content + ) + content = re.sub( + "PATCH_VERSION: Final = .*\n", f'PATCH_VERSION: Final = "{patch}"\n', content + ) with open("homeassistant/const.py", "wt") as fil: content = fil.write(content)