Skip to content

Commit

Permalink
Pick up the brand name and build number from file
Browse files Browse the repository at this point in the history
  • Loading branch information
BPerlakiH committed Jan 15, 2024
1 parent 1c6d61a commit f5a0473
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions src/generate_and_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -41,4 +23,4 @@ def main():


if __name__ == "__main__":
main()
main()

0 comments on commit f5a0473

Please sign in to comment.