1
0

version meta field is always required again

BMM won't detect updates if the version is None. Since the previous schema required version to be None when using `fixed-release-tag-updates`, that meant that manual updates via PR wouldn't be detected.
This commit is contained in:
Gabriel Freitas
2025-07-07 12:14:35 -03:00
parent 412c6df3d0
commit eaaef217c1
2 changed files with 4 additions and 17 deletions

View File

@@ -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) - **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: - *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 `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`. - 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`.

View File

@@ -61,7 +61,8 @@
"categories", "categories",
"author", "author",
"repo", "repo",
"downloadURL" "downloadURL",
"version"
], ],
"allOf": [ "allOf": [
{ {
@@ -120,13 +121,7 @@
] ]
}, },
"then": { "then": {
"$comment": "Conditions when 'fixed-release-tag-updates' is true)", "$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."
},
"properties": { "properties": {
"automatic-version-check": { "automatic-version-check": {
"const": true, "const": true,
@@ -140,14 +135,7 @@
"required": [ "required": [
"automatic-version-check" "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." "errorMessage": "When 'fixed-release-tag-updates' '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."
} }
} }
] ]