aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorras0219 <533828+ras0219@users.noreply.github.com>2020-12-06 15:31:34 -0800
committerGitHub <noreply@github.com>2020-12-06 15:31:34 -0800
commitc303dd024e2dc03a0665ddffbb12a1077933e649 (patch)
treedfb420d6abc7506e7de4f806a354d4104c1a0850 /scripts
parent6dfe1be6fa865be127756db039d1bd79e30fd7cc (diff)
downloadvcpkg-c303dd024e2dc03a0665ddffbb12a1077933e649.tar.gz
vcpkg-c303dd024e2dc03a0665ddffbb12a1077933e649.zip
[vcpkg] Add versioning fields to schema (#14947)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/vcpkg.schema.json256
1 files changed, 180 insertions, 76 deletions
diff --git a/scripts/vcpkg.schema.json b/scripts/vcpkg.schema.json
index ae20ad6e3..723b14646 100644
--- a/scripts/vcpkg.schema.json
+++ b/scripts/vcpkg.schema.json
@@ -21,6 +21,69 @@
}
]
},
+ "version-text": {
+ "type": "string",
+ "pattern": "[^#]+"
+ },
+ "has-schemed-version": {
+ "type": "object",
+ "oneOf": [
+ {
+ "properties": {
+ "version-string": {
+ "description": "Text used to identify an arbitrary version",
+ "type": "string",
+ "pattern": "^[^#]+$"
+ }
+ },
+ "required": [
+ "version-string"
+ ]
+ },
+ {
+ "properties": {
+ "version": {
+ "description": "A relaxed version string (1.2.3.4...)",
+ "type": "string",
+ "pattern": "^\\d+(\\.\\d+)*$"
+ }
+ },
+ "required": [
+ "version"
+ ]
+ },
+ {
+ "properties": {
+ "version-semver": {
+ "description": "A semantic version string. See https://semver.org/",
+ "type": "string",
+ "pattern": "^\\d+\\.\\d+\\.\\d+([+-].+)?$"
+ }
+ },
+ "required": [
+ "version-semver"
+ ]
+ },
+ {
+ "properties": {
+ "version-date": {
+ "description": "A date version string (e.g. 2020-01-20)",
+ "type": "string",
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}(\\.\\d+)*$"
+ }
+ },
+ "required": [
+ "version-date"
+ ]
+ }
+ ]
+ },
+ "port-version": {
+ "description": "A non-negative integer indicating the port revision. If this field doesn't exist, it's assumed to be `0`.",
+ "type": "integer",
+ "minimum": 0,
+ "default": 0
+ },
"package-name": {
"description": "Name of a package.",
"allOf": [
@@ -71,6 +134,14 @@
},
"platform": {
"$ref": "#/definitions/platform-expression"
+ },
+ "version>=": {
+ "description": "Minimum required port version",
+ "$ref": "#/definitions/version-text"
+ },
+ "port-version": {
+ "description": "Minimum port revision (defaults to 0)",
+ "$ref": "#/definitions/port-version"
}
},
"patternProperties": {
@@ -92,6 +163,28 @@
}
]
},
+ "override": {
+ "description": "A version override.",
+ "type": "object",
+ "properties": {
+ "name": {
+ "$ref": "#/definitions/identifier"
+ },
+ "version": {
+ "$ref": "#/definitions/version-text"
+ },
+ "port-version": {
+ "$ref": "#/definitions/port-version"
+ }
+ },
+ "patternProperties": {
+ "^\\$": {}
+ },
+ "required": [
+ "name",
+ "version"
+ ]
+ },
"platform-expression": {
"description": "A specification of a set of platforms. See https://github.com/microsoft/vcpkg/blob/master/docs/specifications/manifests.md#definitions.",
"type": "string"
@@ -125,82 +218,93 @@
}
},
"type": "object",
- "properties": {
- "name": {
- "$ref": "#/definitions/package-name"
- },
- "version-string": {
- "description": "A string without semantic meaning, equivalent to `CONTROL`'s `Version` field.",
- "type": "string"
- },
- "port-version": {
- "description": "A non-negative integer. If this field doesn't exist, it's assumed to be `0`.",
- "type": "integer",
- "minimum": 0,
- "default": 0
- },
- "maintainers": {
- "description": "An array of strings which contain the authors of a package",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "description": {
- "$ref": "#/definitions/description-field"
- },
- "homepage": {
- "description": "A url which points to the homepage of a package.",
- "type": "string",
- "format": "uri"
- },
- "documentation": {
- "description": "A url which points to the documentation of a package.",
- "type": "string",
- "format": "uri"
- },
- "license": {
- "description": "An SPDX license expression at version 3.9.",
- "type": "string"
- },
- "dependencies": {
- "description": "Dependencies that are always required.",
- "type": "array",
- "items": {
- "$ref": "#/definitions/dependency"
- }
- },
- "dev-dependencies": {
- "description": "Dependencies only required for developers (testing and the like).",
- "type": "array",
- "items": {
- "$ref": "#/definitions/dependency"
- }
- },
- "features": {
- "description": "An array of features supported by the package",
- "type": "array",
- "items": {
- "$ref": "#/definitions/feature"
- }
- },
- "default-features": {
- "description": "Features enabled by default with the package.",
- "type": "array",
- "items": {
- "$ref": "#/definitions/identifier"
- }
+ "allOf": [
+ {
+ "properties": {
+ "name": {
+ "description": "The name of the top-level package",
+ "$ref": "#/definitions/package-name"
+ },
+ "version-string": {},
+ "version": {},
+ "version-date": {},
+ "version-semver": {},
+ "port-version": {
+ "$ref": "#/definitions/port-version"
+ },
+ "maintainers": {
+ "description": "An array of strings which contain the authors of a package",
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "description": {
+ "$ref": "#/definitions/description-field"
+ },
+ "homepage": {
+ "description": "A url which points to the homepage of a package.",
+ "type": "string",
+ "format": "uri"
+ },
+ "documentation": {
+ "description": "A url which points to the documentation of a package.",
+ "type": "string",
+ "format": "uri"
+ },
+ "license": {
+ "description": "An SPDX license expression at version 3.9.",
+ "type": "string"
+ },
+ "dependencies": {
+ "description": "Dependencies that are always required.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/dependency"
+ }
+ },
+ "overrides": {
+ "description": "Version overrides for dependencies.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/override"
+ }
+ },
+ "dev-dependencies": {
+ "description": "Dependencies only required for developers (testing and the like).",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/dependency"
+ }
+ },
+ "features": {
+ "description": "An array of features supported by the package",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/feature"
+ }
+ },
+ "default-features": {
+ "description": "Features enabled by default with the package.",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/identifier"
+ }
+ },
+ "supports": {
+ "$ref": "#/definitions/platform-expression"
+ }
+ },
+ "patternProperties": {
+ "^\\$": {}
+ },
+ "required": [
+ "name"
+ ],
+ "additionalProperties": false
},
- "supports": {
- "$ref": "#/definitions/platform-expression"
+ {
+ "$ref": "#/definitions/has-schemed-version"
}
- },
- "patternProperties": {
- "^\\$": {}
- },
- "required": [
- "name",
- "version-string"
- ],
- "additionalProperties": false
+ ]
}