mirror of
https://github.com/kiwix/kiwix-apple-custom.git
synced 2025-09-26 06:23:45 -04:00
Pick up the brand name and build number from file
This commit is contained in:
parent
1c6d61a8d9
commit
f5a0473cd8
@ -5,29 +5,11 @@ where the subfolder name will become the "brand name" of the custom app.
|
|||||||
|
|
||||||
from custom_apps import CustomApps
|
from custom_apps import CustomApps
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import argparse
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
brand = Path(".brand_name").read_text()
|
||||||
description="Builder of custom apps, based on the passed in (optional) brand name and (optional) build version")
|
build_number = int(Path(".build_number").read_text())
|
||||||
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
|
|
||||||
|
|
||||||
custom_apps = CustomApps(brands=[brand], build_number=build_number)
|
custom_apps = CustomApps(brands=[brand], build_number=build_number)
|
||||||
# create the plist files
|
# create the plist files
|
||||||
@ -41,4 +23,4 @@ def main():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user