From 60ab9ac360e32897ca41cb0e3b48a325e5db9184 Mon Sep 17 00:00:00 2001 From: strahi-linux Date: Wed, 18 Sep 2024 15:07:11 +0200 Subject: [PATCH] Updated template versioning system --- scripts/index.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/index.py b/scripts/index.py index 6dbcbfbd4..1fa58a7ce 100644 --- a/scripts/index.py +++ b/scripts/index.py @@ -216,9 +216,12 @@ def index_release_to_elasticsearch(es : Elasticsearch, index_name, release_detai package_changed = True if len(metadata_content) > 1: package_changed = metadata_content[0]['templates']['hash'] != metadata_content[1]['templates']['hash'] + templates_version = check_from_index(es, index_name, 'templates') + if package_changed: + templates_version = increment_version(templates_version) doc = { "name": name_without_extension, - "version" : version, + "version" : templates_version, "display_name" : "NECTO project templates", "hidden" : True, "vendor" : "MIKROE",