diff --git a/README.md b/README.md index 3d43b494..69c2c796 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,6 @@ This file stores essential metadata in JSON format. **Make sure you adhere to th - **Latest commit**: Using a link to the [latest commit (HEAD)](https://docs.github.com/en/repositories/working-with-files/using-files/downloading-source-code-archives#source-code-archive-urls) - *fixed-release-tag-updates*: (*Optional*) Set to `true` if your mod uses a fixed release tag and still wants to auto-update when modifying the underlying files. This can be useful for repositories with multiple mods, allowing you to have a release tag dedicated for each mod where you upload new versions. Note that: - Requires `automatic-version-check` to also be set to `true`. - - Requires that the `version` field is not set as the version will be extracted from the asset's upload date. - The `downloadURL` must point to a specific release asset using a link such as `https://github.com/author/repo/releases/download/my-release-tag/mod.zip`. diff --git a/schema/meta.schema.json b/schema/meta.schema.json index 786f8ac3..a88ead48 100644 --- a/schema/meta.schema.json +++ b/schema/meta.schema.json @@ -61,7 +61,8 @@ "categories", "author", "repo", - "downloadURL" + "downloadURL", + "version" ], "allOf": [ { @@ -120,13 +121,7 @@ ] }, "then": { - "$comment": "Conditions when 'fixed-release-tag-updates' is true)", - "not": { - "required": [ - "version" - ], - "errorMessage": "When 'fixed-release-tag-updates' is true, the 'version' field must NOT be present as the version is extracted automatically." - }, + "$comment": "Conditions when 'fixed-release-tag-updates' is true", "properties": { "automatic-version-check": { "const": true, @@ -140,14 +135,7 @@ "required": [ "automatic-version-check" ], - "errorMessage": "When 'fixed-release-tag-updates' is true: 'version' must be absent, 'automatic-version-check' must be true, and 'downloadURL' must point to a specific release asset." - }, - "else": { - "$comment": "Conditions when 'fixed-release-tag-updates' is false or absent", - "required": [ - "version" - ], - "errorMessage": "When 'fixed-release-tag-updates' is false or absent, the 'version' field is required." + "errorMessage": "When 'fixed-release-tag-updates' 'automatic-version-check' must be true, and 'downloadURL' must point to a specific release asset." } } ]