From 51a026611bf4a0653f5102b327a75ffa1e05f2a8 Mon Sep 17 00:00:00 2001 From: Rikko Date: Fri, 16 Jun 2023 00:12:14 +0530 Subject: [PATCH 1/5] Execute tests for maps --- test/auto_apply_version_metadata.py | 4 ++++ test/test_checks.py | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/test/auto_apply_version_metadata.py b/test/auto_apply_version_metadata.py index 5dd8b5b..1f8719a 100644 --- a/test/auto_apply_version_metadata.py +++ b/test/auto_apply_version_metadata.py @@ -205,6 +205,10 @@ def auto_apply_version_metadata(last_commit_sha): category_json = utilities.apply_version_metadata_to_null_version_values(last_commit_sha) utilities.save(category_json) + maps = CategoryVersionMetadata(os.path.join("plugins", "maps")) + category_json = maps.apply_version_metadata_to_null_version_values(last_commit_sha) + maps.save(category_json) + minigames = CategoryVersionMetadata(os.path.join("plugins", "minigames")) category_json = minigames.apply_version_metadata_to_null_version_values(last_commit_sha) minigames.save(category_json) diff --git a/test/test_checks.py b/test/test_checks.py index d338419..4971bfe 100644 --- a/test/test_checks.py +++ b/test/test_checks.py @@ -163,6 +163,15 @@ class TestUtilitiesCategoryMetadata(BaseCategoryMetadataTestCases.BaseTest): self.content = json.load(fin) +class TestMapsCategoryMetadata(BaseCategoryMetadataTestCases.BaseTest): + def setUp(self): + super().setUp() + self.name = "Maps" + self.category = os.path.join("plugins", "maps") + with open(f"{self.category}.json", "rb") as fin: + self.content = json.load(fin) + + class TestMinigamesCategoryMetadata(BaseCategoryMetadataTestCases.BaseTest): def setUp(self): super().setUp() From 28031eb1f7d065b1a0c60f9aca0862e28b271d5f Mon Sep 17 00:00:00 2001 From: Rikko Date: Fri, 16 Jun 2023 00:14:09 +0530 Subject: [PATCH 2/5] Correct maps.json --- plugins/maps.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/maps.json b/plugins/maps.json index f5b8fe4..ecce128 100644 --- a/plugins/maps.json +++ b/plugins/maps.json @@ -15,7 +15,7 @@ ], "versions": { "1.0.0": null - }, - }, + } + } } } From 72d2d6260102e01d024432460194ac631635b761 Mon Sep 17 00:00:00 2001 From: Rikko Date: Fri, 16 Jun 2023 00:18:04 +0530 Subject: [PATCH 3/5] Replace "Loading..." text with the exception message if any --- CHANGELOG.md | 4 ++++ index.json | 3 ++- plugin_manager.py | 6 +++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddb321a..85ebd58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Plugin Manager (dd-mm-yyyy) +### 0.3.5 (16-06-2023) + +- Replace the "Loading..." text with the exception message in case something goes wrong. + ### 0.3.4 (14-05-2023) - Optimize new plugin detection mechanism. diff --git a/index.json b/index.json index 4fbe385..ba8c58b 100644 --- a/index.json +++ b/index.json @@ -1,6 +1,7 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { + "0.3.5": null, "0.3.4": { "api_version": 7, "commit_sha": "2d74b52", @@ -98,4 +99,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} \ No newline at end of file +} diff --git a/plugin_manager.py b/plugin_manager.py index fd10350..ea83afe 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -25,7 +25,7 @@ _env = _ba.env() _uiscale = ba.app.ui.uiscale -PLUGIN_MANAGER_VERSION = "0.3.4" +PLUGIN_MANAGER_VERSION = "0.3.5" REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager" # Current tag can be changed to "staging" or any other branch in # plugin manager repo for testing purpose. @@ -1538,6 +1538,10 @@ class PluginManagerWindow(ba.Window): except RuntimeError: # User probably went back before a ba.Window could finish loading. pass + except Exception as e: + ba.textwidget(edit=self._plugin_manager_status_text, + text=str(e)) + raise async def draw_index(self): self.draw_search_bar() From 985e486b6550dab6847ebdd66f5ea91f126e77cb Mon Sep 17 00:00:00 2001 From: Rikko Date: Fri, 16 Jun 2023 00:18:44 +0530 Subject: [PATCH 4/5] Make map name meta consistent with filename --- plugins/maps.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/maps.json b/plugins/maps.json index ecce128..14a7e3d 100644 --- a/plugins/maps.json +++ b/plugins/maps.json @@ -3,7 +3,7 @@ "description": "Maps", "plugins_base_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps", "plugins": { - "forest_map": { + "forest": { "description": "Basically bridgit map but outter version", "external_url": "", "authors": [ From 34cceed75844396cbde9af82a17b836663558d4f Mon Sep 17 00:00:00 2001 From: rikkolovescats Date: Thu, 15 Jun 2023 18:49:24 +0000 Subject: [PATCH 5/5] [ci] apply-version-metadata --- index.json | 9 +++++++-- plugins/maps.json | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/index.json b/index.json index ba8c58b..3e3e90e 100644 --- a/index.json +++ b/index.json @@ -1,7 +1,12 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "0.3.5": null, + "0.3.5": { + "api_version": 7, + "commit_sha": "985e486", + "released_on": "15-06-2023", + "md5sum": "5da137a353b4fa35e4d9926107cf4754" + }, "0.3.4": { "api_version": 7, "commit_sha": "2d74b52", @@ -99,4 +104,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} +} \ No newline at end of file diff --git a/plugins/maps.json b/plugins/maps.json index 14a7e3d..7d509ef 100644 --- a/plugins/maps.json +++ b/plugins/maps.json @@ -14,8 +14,13 @@ } ], "versions": { - "1.0.0": null + "1.0.0": { + "api_version": 7, + "commit_sha": "985e486", + "released_on": "15-06-2023", + "md5sum": "01fb81dc27d63789f31559140ec2bd72" + } } } } -} +} \ No newline at end of file