From 7097b7677ea8196f2e3052debe193b7c95ce0a09 Mon Sep 17 00:00:00 2001 From: Andrey Yantsen Date: Sun, 4 Sep 2022 09:23:54 +0100 Subject: [PATCH] Add the same docker tags as used in HA (#3752) --- docker/build.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docker/build.py b/docker/build.py index d5926ae3d4..ae977f87c1 100755 --- a/docker/build.py +++ b/docker/build.py @@ -88,10 +88,12 @@ def main(): sys.exit(1) # detect channel from tag - match = re.match(r'^\d+\.\d+(?:\.\d+)?(b\d+)?$', args.tag) + match = re.match(r"^(\d+\.\d+)(?:\.\d+)?(b\d+)?$", args.tag) + major_minor_version = None if match is None: channel = CHANNEL_DEV - elif match.group(1) is None: + elif match.group(2) is None: + major_minor_version = match.group(1) channel = CHANNEL_RELEASE else: channel = CHANNEL_BETA @@ -106,6 +108,11 @@ def main(): tags_to_push.append("beta") tags_to_push.append("latest") + # Compatibility with HA tags + if major_minor_version: + tags_to_push.append("stable") + tags_to_push.append(major_minor_version) + if args.command == "build": # 1. pull cache image params = DockerParams.for_type_arch(args.build_type, args.arch)