add v0.9.10 to restore URL list

This commit is contained in:
bunnie 2022-10-09 23:37:48 +08:00
parent 78e72e6ef4
commit 9732ecdc18

View file

@ -474,6 +474,9 @@ def main():
parser.add_argument( parser.add_argument(
"--peek", required=False, help="Inspect an address", type=auto_int, metavar=('ADDR') "--peek", required=False, help="Inspect an address", type=auto_int, metavar=('ADDR')
) )
parser.add_argument(
"--file", required=False, help="File to restore from. Defaults to backup.pddb", default="backup.pddb", type=str
)
args = parser.parse_args() args = parser.parse_args()
dev = usb.core.find(idProduct=0x5bf0, idVendor=0x1209) dev = usb.core.find(idProduct=0x5bf0, idVendor=0x1209)
@ -542,7 +545,7 @@ def main():
3: "zh", 3: "zh",
} }
try: try:
with open("backup.pddb", "rb") as backup_file: with open(args.file, "rb") as backup_file:
backup = bytearray(backup_file.read()) backup = bytearray(backup_file.read())
i = 0 i = 0
@ -638,12 +641,12 @@ def main():
# now try to download all the artifacts and check their versions # now try to download all the artifacts and check their versions
# this list should visit kernels in order from newest to oldest. # this list should visit kernels in order from newest to oldest.
URL_LIST = [ URL_LIST = [
'https://ci.betrusted.io/releases/v0.9.10/',
'https://ci.betrusted.io/releases/v0.9.9/', 'https://ci.betrusted.io/releases/v0.9.9/',
'https://ci.betrusted.io/releases/v0.9.8/', 'https://ci.betrusted.io/releases/v0.9.8/',
'https://ci.betrusted.io/releases/v0.9.7/' 'https://ci.betrusted.io/releases/v0.9.7/'
] ]
if backup_version == 0x10001: if False: # insert bleeding-edge build for pre-release testing
# insert bleeding-edge build for pre-release testing
URL_LIST.insert(0, 'https://ci.betrusted.io/latest-ci/') URL_LIST.insert(0, 'https://ci.betrusted.io/latest-ci/')
attempt = 0 attempt = 0