Skip to content

Commit 165c3f2

Browse files
authored
Update packages object (#1637)
## Summary Updates the schema to better reflect the packages object -- packages can be either: * A list of Strings * An object, where each key contains either a version string or an object ## How was it tested? Used the following package list: ```json "packages": { "go": "latest", "runx:golangci/golangci-lint": "latest", "runx:mvdan/gofumpt": "latest", "glibcLocales": { "version": "latest", "excluded_platforms": ["aarch64-darwin"] } }, ```
1 parent 076da53 commit 165c3f2

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

.schema/devbox.schema.json

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,45 @@
1919
"type": "string"
2020
}
2121
},
22-
{
23-
"type": "object",
24-
"description": "Name of each package in {\"name\": \"version\"} format.",
25-
"patternProperties": {
26-
".*": {
27-
"type": "string",
28-
"description": "Version of the package to install."
29-
}
30-
}
31-
},
3222
{
3323
"type": "object",
3424
"description": "Name of each package in {\"name\": {\"version\": \"1.2.3\"}} format.",
3525
"patternProperties": {
3626
".*": {
27+
"oneOf": [
28+
{
3729
"type": "object",
3830
"description": "Version number of the specified package in {\"version\": \"1.2.3\"} format.",
3931
"properties": {
4032
"version": {
4133
"type": "string",
4234
"description": "Version of the package"
4335
},
44-
"platform": {},
45-
"excluded_platform": {},
46-
"glibc_patch": {}
36+
"platforms": {
37+
"type": "array",
38+
"description": "Names of platforms to install the package on. This package will be skipped for any platforms not on this list",
39+
"items": {
40+
"enum": ["i686-linux", "aarch64-linux", "aarch64-darwin", "x86_64-darwin", "x86_64-linux", "armv7l-linux"]
41+
}
42+
},
43+
"excluded_platforms": {
44+
"type": "array",
45+
"description": "Names of platforms to exclude the package on",
46+
"items": {
47+
"enum": ["i686-linux", "aarch64-linux", "aarch64-darwin", "x86_64-darwin", "x86_64-linux", "armv7l-linux"]
48+
}
49+
},
50+
"glibc_patch": {
51+
"type":"boolean",
52+
"description": "Whether to patch glibc to the latest available version for this package"
53+
}
4754
}
55+
},
56+
{
57+
"type": "string",
58+
"description": "Version of the package to install."
59+
}
60+
]
4861
}
4962
}
5063
}

0 commit comments

Comments
 (0)