Update ota_manifest.py

This commit is contained in:
iranl
2024-08-01 14:52:29 +02:00
committed by GitHub
parent e236cc3585
commit 03b89c35e4

View File

@@ -35,8 +35,13 @@ 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'] = version
if (args.ota_type == "release"):
data[args.ota_type]['version'] = str(version)
else:
data[args.ota_type]['version'] = str(version) + "-" + args.ota_type + str(number)
data[args.ota_type]['build'] = args.build
json_file.seek(0)
json.dump(data, json_file, indent=4)
json_file.truncate()
json_file.truncate()