Update ota_manifest.py
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user