Add latest_valid_build to the plist output

This commit is contained in:
Graham Pugh 2022-10-03 00:23:10 +02:00
parent b1b7a8d02e
commit 881c394399

View File

@ -1063,7 +1063,6 @@ def main():
# determine the latest valid build ID and select this
# when using auto, os and version options
if args.auto or args.version or args.os:
if args.beta or "Beta" not in product_info[product_id]["title"]:
try:
latest_valid_build
@ -1078,10 +1077,7 @@ def main():
if latest_valid_build == args.newer_than_version:
continue
# if using renew option, skip if the same as the current version
if (
args.renew
and build_info[0] == product_info[product_id]["version"]
):
if args.renew and build_info[0] == product_info[product_id]["version"]:
continue
answer = index + 1
else:
@ -1148,6 +1144,12 @@ def main():
# Output a plist of available updates and quit if list option chosen
if args.list:
try:
print("\nLatest valid build: %s (# %s)" % (latest_valid_build, answer))
pl["latest_valid_build"] = latest_valid_build
except NameError:
pl["latest_valid_build"] = ""
print("\nNo valid build found")
write_plist(pl, output_plist)
print("\nValid seeding programs are: %s\n" % ", ".join(get_seeding_programs()))
exit(0)