Skip to content

Commit 8ec1138

Browse files
authored
Merge pull request #223 from per1234/add-all-host
Add support for "all" host type in package index tool definition
2 parents b7d561a + f78016a commit 8ec1138

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

Diff for: etc/schemas/arduino-package-index-definitions-schema.json

+3
Original file line numberDiff line numberDiff line change
@@ -1369,6 +1369,9 @@
13691369
"validHost": {
13701370
"$comment": "https://github.com/arduino/arduino-cli/blob/cdbebe98f895c18146ea2607cfb706d002b01191/arduino/cores/tools.go#L144-L155",
13711371
"anyOf": [
1372+
{
1373+
"pattern": "^all$"
1374+
},
13721375
{
13731376
"pattern": "^arm.*-linux-gnueabihf$"
13741377
},

Diff for: internal/project/packageindex/packageindexschemas_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,10 @@ func TestPattern(t *testing.T) {
487487
{"/packages/0/tools/0/systems/0/size", "foo", compliancelevel.Specification, assert.True},
488488
{"/packages/0/tools/0/systems/0/size", "foo", compliancelevel.Strict, assert.True},
489489

490+
{"/packages/0/tools/0/systems/0/host", "all", compliancelevel.Permissive, assert.False},
491+
{"/packages/0/tools/0/systems/0/host", "all", compliancelevel.Specification, assert.False},
492+
{"/packages/0/tools/0/systems/0/host", "all", compliancelevel.Strict, assert.False},
493+
490494
{"/packages/0/tools/0/systems/0/host", "arm-linux-gnueabihf", compliancelevel.Permissive, assert.False},
491495
{"/packages/0/tools/0/systems/0/host", "arm-linux-gnueabihf", compliancelevel.Specification, assert.False},
492496
{"/packages/0/tools/0/systems/0/host", "arm-linux-gnueabihf", compliancelevel.Strict, assert.False},

Diff for: internal/rule/schema/schemadata/bindata.go

+3
Original file line numberDiff line numberDiff line change
@@ -3904,6 +3904,9 @@ var _arduinoPackageIndexDefinitionsSchemaJson = []byte(`{
39043904
"validHost": {
39053905
"$comment": "https://github.com/arduino/arduino-cli/blob/cdbebe98f895c18146ea2607cfb706d002b01191/arduino/cores/tools.go#L144-L155",
39063906
"anyOf": [
3907+
{
3908+
"pattern": "^all$"
3909+
},
39073910
{
39083911
"pattern": "^arm.*-linux-gnueabihf$"
39093912
},

0 commit comments

Comments
 (0)