[prdoc] Optional SemVer bumps and Docs (#3441)

Changes:
- Add an optional `bump` field to the crates in a prdoc.
- Explain the cargo semver interpretation for <1 versions in the release
doc.

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2024-02-28 13:13:27 +01:00
committed by GitHub
parent f1b2189e83
commit f4eedcebaf
2 changed files with 38 additions and 7 deletions
+29 -4
View File
@@ -3,9 +3,8 @@
"$id": "https://raw.githubusercontent.com/paritytech/prdoc/master/prdoc_schema_user.json",
"version": {
"major": 1,
"minor": 0,
"patch": 0,
"timestamp": 20230817152351
"minor": 1,
"patch": 0
},
"title": "Polkadot SDK PRDoc Schema",
"description": "JSON Schema definition for the Polkadot SDK PR documentation",
@@ -125,10 +124,16 @@
"name": {
"type": "string"
},
"bump": {
"$ref": "#/$defs/semver_bump"
},
"note": {
"type": "string"
}
}
},
"required": [
"name"
]
},
"migration_db": {
"type": "object",
@@ -165,6 +170,26 @@
"description"
]
},
"semver_bump": {
"description": "The type of bump to apply to the crate version according to Cargo SemVer: https://doc.rust-lang.org/cargo/reference/semver.html. Please check docs/RELEASE.md for more information.",
"oneOf": [
{
"const": "major",
"title": "Major",
"description": "A bump to the leftmost non-zero digit of the version number."
},
{
"const": "minor",
"title": "Minor",
"description": "A bump to the second leftmost non-zero digit of the version number."
},
{
"const": "patch",
"title": "Patch",
"description": "A bump to the third leftmost non-zero digit of the version number."
}
]
},
"doc": {
"type": "object",
"description": "You have the the option to provide different description of your PR for different audiences.",