Update ota_manifest.py

This commit is contained in:
iranl
2024-08-01 15:11:56 +02:00
committed by GitHub
parent 0bccc72fa5
commit 72a23cdafd

View File

@@ -24,6 +24,7 @@ with open('ota/manifest.json', 'r+') as json_file:
if (args.build == 'none'):
data[args.ota_type]['time'] = "0000-00-00 00:00:00"
data[args.ota_type]['version'] = "No beta available"
data[args.ota_type]['fullversion'] = "No beta available"
data[args.ota_type]['build'] = ""
del(data[args.ota_type]['number'])
else:
@@ -35,11 +36,12 @@ with open('ota/manifest.json', 'r+') as json_file:
data[args.ota_type]['number'] = 1
data[args.ota_type]['time'] = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S")
data[args.ota_type]['version'] = str(version)
if (args.ota_type == "release"):
data[args.ota_type]['version'] = str(version)
data[args.ota_type]['fullversion'] = str(version)
else:
data[args.ota_type]['version'] = str(version) + "-" + args.ota_type + str(number)
data[args.ota_type]['fullversion'] = str(version) + "-" + args.ota_type + str(number)
data[args.ota_type]['build'] = args.build
json_file.seek(0)