From d49925b8d17d206a8edf5b537b64c2055dc697c4 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 9 Feb 2022 17:04:55 +0100 Subject: make resource dependency specifier an object --- src/hydrilla/builder/build.py | 5 ++++- src/hydrilla/schemas | 2 +- src/test/source-package-example | 2 +- src/test/test_hydrilla_builder.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/hydrilla/builder/build.py b/src/hydrilla/builder/build.py index 0044614..cdbfad3 100644 --- a/src/hydrilla/builder/build.py +++ b/src/hydrilla/builder/build.py @@ -251,8 +251,11 @@ class Build: script_file_refs = [self._process_file(f['file']) for f in item_def.get('scripts', [])] + deps = [{'identifier': res_ref['identifier']} + for res_ref in item_def.get('dependencies', [])] + new_item_obj = { - 'dependencies': item_def.get('dependencies', []), + 'dependencies': deps, 'scripts': script_file_refs } else: diff --git a/src/hydrilla/schemas b/src/hydrilla/schemas index c72c843..15d58da 160000 --- a/src/hydrilla/schemas +++ b/src/hydrilla/schemas @@ -1 +1 @@ -Subproject commit c72c8438875d20b156d22d975523a19bbb407d95 +Subproject commit 15d58dac1975a5429f9d1223676dddc1026b2a75 diff --git a/src/test/source-package-example b/src/test/source-package-example index e571b39..26c4622 160000 --- a/src/test/source-package-example +++ b/src/test/source-package-example @@ -1 +1 @@ -Subproject commit e571b3911f198e3feccc8d06390c79131f9cf09d +Subproject commit 26c4622417cb786825b1b18083adfe5ce44b2756 diff --git a/src/test/test_hydrilla_builder.py b/src/test/test_hydrilla_builder.py index f079d34..041a3f6 100644 --- a/src/test/test_hydrilla_builder.py +++ b/src/test/test_hydrilla_builder.py @@ -73,7 +73,7 @@ class CaseSettings: 'version': [2021, 11, 10], 'revision': 1, 'description': 'greets an apple', - 'dependencies': ['hello-message'], + 'dependencies': [{'identifier': 'hello-message'}], 'scripts': [{ 'file': 'hello.js', 'sha256': self.sha256_hashes['hello.js'] -- cgit v1.2.3