From f5a0473cd82513e1feb0161116a17a37ce334f32 Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath Date: Mon, 15 Jan 2024 08:55:49 +0100 Subject: [PATCH] Pick up the brand name and build number from file --- src/generate_and_download.py | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/src/generate_and_download.py b/src/generate_and_download.py index f43ae56..2ed2a02 100644 --- a/src/generate_and_download.py +++ b/src/generate_and_download.py @@ -5,29 +5,11 @@ from custom_apps import CustomApps from pathlib import Path -import argparse + def main(): - parser = argparse.ArgumentParser( - description="Builder of custom apps, based on the passed in (optional) brand name and (optional) build version") - parser.add_argument( - "brand_name", - nargs='?', - default='all', - help="The brand name to be built, if not provided will fall back to all apps", - type=str - ) - - parser.add_argument( - "build_number", - nargs='?', - default=None, - help="The optional build version to use, if not provided will fall back to the build_number defined in the info.json value", - type=int - ) - args = parser.parse_args() - brand = args.brand_name - build_number = args.build_number + brand = Path(".brand_name").read_text() + build_number = int(Path(".build_number").read_text()) custom_apps = CustomApps(brands=[brand], build_number=build_number) # create the plist files @@ -41,4 +23,4 @@ def main(): if __name__ == "__main__": - main() \ No newline at end of file + main()