Pick up the brand name and build number from file

This commit is contained in:
Balazs Perlaki-Horvath 2024-01-15 08:55:49 +01:00
parent 1c6d61a8d9
commit f5a0473cd8

View File

@ -5,29 +5,11 @@ where the subfolder name will become the "brand name" of the custom app.
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