mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-10-29 09:33:50 +08:00
package CI OTA images [upload]
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import hashlib
|
||||
@@ -170,9 +171,12 @@ def process_file(entry):
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--ota-only", action="store_true", help="Package only OTA partitions and manifests")
|
||||
args = parser.parse_args()
|
||||
OTA_OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
files = [(process_file(x), x.ota) for x in GPTS + PARTITIONS]
|
||||
files = [(process_file(x), x.ota) for x in GPTS + PARTITIONS if not args.ota_only or x.ota]
|
||||
|
||||
configs = [
|
||||
# URL, file name, only OTA partitions
|
||||
@@ -182,6 +186,8 @@ if __name__ == "__main__":
|
||||
(AGNOS_STAGING_UPDATE_URL, "all-partitions-staging.json", False),
|
||||
]
|
||||
for remote_url, output_fn, only_ota in configs:
|
||||
if args.ota_only and not only_ota:
|
||||
continue
|
||||
processed_files = []
|
||||
for f, ota in deepcopy(files):
|
||||
if only_ota and not ota:
|
||||
|
||||
Reference in New Issue
Block a user