From b9a1fcc21a2a1c1a2e81e25bffe567f05e3b4189 Mon Sep 17 00:00:00 2001 From: Adam Plaice Date: Tue, 31 Jan 2023 10:13:34 +0100 Subject: [PATCH 1/2] WIP Add manifest.json I do not think that keeping manifest.json in the source tree has any disadvantages (e.g. for manual install or for uploading to AnkiWeb). Having a manifest.json allows users to install the zipped add-on via the new-ish "sharing outside ankiweb" install process[0]. Not all the fields are specified in the docs, but they can be sleuthed by inspecting Anki's source code[1]. It _might_ make sense for `mod` and `human_version`, to be updated automatically, when releasing, or we could just drop them. If we ever have beta builds, the conflicts field could allow the release builds to conflict with the beta builds (and vice-versa), to allow users a way to quickly and easily switch. A positive max_point_version does not indicate maximum 2.1.x compatible Anki version, but the highest version tested. [0] https://addon-docs.ankiweb.net/sharing.html#sharing-outside-ankiweb [1] https://github.com/ankitects/anki/blob/ c32f14f7cbc9461e35548afa5b42c5424606008f/qt/aqt/addons.py#L186 --- crowd_anki/manifest.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 crowd_anki/manifest.json diff --git a/crowd_anki/manifest.json b/crowd_anki/manifest.json new file mode 100644 index 0000000..6e83c90 --- /dev/null +++ b/crowd_anki/manifest.json @@ -0,0 +1,10 @@ +{ + "package": "crowd-anki", + "name": "CrowdAnki", + "mod": 1675154545, + "conflicts": [], + "min_point_version": 50, + "max_point_version": 57, + "human_version": "v0.9.3", + "homepage": "https://github.com/Stvad/CrowdAnki/" +} From f8af2a4a86fe72b7b52dea96cc9d480eb46e04b9 Mon Sep 17 00:00:00 2001 From: Adam Plaice Date: Mon, 29 May 2023 10:44:58 +0200 Subject: [PATCH 2/2] Drop the manifest.json fields that would require "churn" `mod` and `human_version` could be added automatically during release, with `date "+%s"` and `git describe`. --- crowd_anki/manifest.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/crowd_anki/manifest.json b/crowd_anki/manifest.json index 6e83c90..a840fb6 100644 --- a/crowd_anki/manifest.json +++ b/crowd_anki/manifest.json @@ -1,10 +1,7 @@ { "package": "crowd-anki", "name": "CrowdAnki", - "mod": 1675154545, "conflicts": [], "min_point_version": 50, - "max_point_version": 57, - "human_version": "v0.9.3", "homepage": "https://github.com/Stvad/CrowdAnki/" }