Skip to content

Commit 8c7dffc

Browse files
committed
update manifest schema for %ProjectVersion% feature
1 parent 67fe56a commit 8c7dffc

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docs/release-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
* The Content Patcher JSON schema now allows decimal values in local tokens (thanks to rikai!).
3434
* The `$schema` value is no longer validated.
3535
* Updated Content Patcher schema for Content Patcher 2.7.0.
36+
* Updated manifest schema for the new `%ProjectVersion%` value in `Version`.
3637
* Improved mod compatibility list:
3738
* Reduced response times with a new cache and client-side fetch.
3839
* Fixed sort order for mods with non-Latin characters in the name.

src/SMAPI.Web/wwwroot/schemas/manifest.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,14 @@
2424
},
2525
"Version": {
2626
"title": "Mod version",
27-
"description": "The mod's semantic version. Make sure you update this for each release! SMAPI uses this for update checks, mod dependencies, and compatibility blacklists (if the mod breaks in a future version of the game).",
28-
"$ref": "#/definitions/SemanticVersion"
27+
"description": "The mod's semantic version, or '%ProjectVersion%' to use the current project's assembly version. Make sure you update this for each release! SMAPI uses this for update checks, mod dependencies, and compatibility blacklists (if the mod breaks in a future version of the game).",
28+
"anyOf": [
29+
{ "$ref": "#/definitions/SemanticVersion" },
30+
{ "const": "%ProjectVersion%" }
31+
],
32+
"@errorMessages": {
33+
"anyOf": "Invalid Value. This must be formatted like 1.2.0 or 1.2.0-prerelease.tags (see https://semver.org/ for more info), or the exact string '%ProjectVersion%'."
34+
}
2935
},
3036
"Description": {
3137
"title": "Mod description",

0 commit comments

Comments
 (0)