From 03b89c35e4aab7dd11953613f18c72adf3669116 Mon Sep 17 00:00:00 2001 From: iranl Date: Thu, 1 Aug 2024 14:52:29 +0200 Subject: [PATCH] Update ota_manifest.py --- resources/ota_manifest.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/resources/ota_manifest.py b/resources/ota_manifest.py index 1ceb99b..f663583 100644 --- a/resources/ota_manifest.py +++ b/resources/ota_manifest.py @@ -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() \ No newline at end of file + json_file.truncate()