Fix a bug that BUILD_VERSION_TAGS is ignored

Bug: 349046347
Test: set BUILD_VERSION_TAGS and build
Change-Id: Ib981d917435d23139ac0c5b0aba5b6893539d200
This commit is contained in:
Inseob Kim 2024-06-25 19:09:12 +09:00 committed by Bartłomiej Rudecki
parent 8cd40a7e3c
commit 3ea2ca1ede
Signed by: przekichane
GPG key ID: 751F23C6F014EF76
2 changed files with 11 additions and 4 deletions

View file

@ -68,6 +68,7 @@ def parse_args():
option.build_id = product_config["BuildId"]
option.build_type = product_config["BuildType"]
option.build_variant = get_build_variant(product_config)
option.build_version_tags = product_config["BuildVersionTags"]
option.cpu_abis = product_config["DeviceAbi"]
option.default_locale = None
if len(product_config.get("ProductLocales", [])) > 0:
@ -96,9 +97,11 @@ def main():
build_hostname = option.build_hostname_file.read().strip()
build_number = option.build_number_file.read().strip()
build_version_tags = option.build_keys
build_version_tags_list = option.build_version_tags
if option.build_type == "debug":
build_version_tags = "debug," + build_version_tags
build_version_tags_list.append("debug")
build_version_tags_list.append(option.build_keys)
build_version_tags = ",".join(sorted(set(build_version_tags_list)))
raw_date = option.date_file.read().strip()
date = subprocess.check_output(["date", "-d", f"@{raw_date}"], text=True).strip()

View file

@ -73,9 +73,13 @@ def parse_args():
config["BuildHostname"] = args.build_hostname_file.read().strip()
config["BuildNumber"] = args.build_number_file.read().strip()
config["BuildUsername"] = args.build_username
config["BuildVersionTags"] = config["BuildKeys"]
build_version_tags_list = config["BuildVersionTags"]
if config["BuildType"] == "debug":
config["BuildVersionTags"] = "debug," + config["BuildVersionTags"]
build_version_tags_list.append("debug")
build_version_tags_list.append(config["BuildKeys"])
build_version_tags = ",".join(sorted(set(build_version_tags_list)))
config["BuildVersionTags"] = build_version_tags
raw_date = args.date_file.read().strip()
config["Date"] = subprocess.check_output(["date", "-d", f"@{raw_date}"], text=True).strip()