Skip to content

Commit

Permalink
Merge pull request #223 from per1234/add-all-host
Browse files Browse the repository at this point in the history
Add support for "all" host type in package index tool definition
  • Loading branch information
per1234 committed Aug 4, 2021
2 parents b7d561a + f78016a commit 8ec1138
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions etc/schemas/arduino-package-index-definitions-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,9 @@
"validHost": {
"$comment": "https://github.com/arduino/arduino-cli/blob/cdbebe98f895c18146ea2607cfb706d002b01191/arduino/cores/tools.go#L144-L155",
"anyOf": [
{
"pattern": "^all$"
},
{
"pattern": "^arm.*-linux-gnueabihf$"
},
Expand Down
4 changes: 4 additions & 0 deletions internal/project/packageindex/packageindexschemas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,10 @@ func TestPattern(t *testing.T) {
{"/packages/0/tools/0/systems/0/size", "foo", compliancelevel.Specification, assert.True},
{"/packages/0/tools/0/systems/0/size", "foo", compliancelevel.Strict, assert.True},

{"/packages/0/tools/0/systems/0/host", "all", compliancelevel.Permissive, assert.False},
{"/packages/0/tools/0/systems/0/host", "all", compliancelevel.Specification, assert.False},
{"/packages/0/tools/0/systems/0/host", "all", compliancelevel.Strict, assert.False},

{"/packages/0/tools/0/systems/0/host", "arm-linux-gnueabihf", compliancelevel.Permissive, assert.False},
{"/packages/0/tools/0/systems/0/host", "arm-linux-gnueabihf", compliancelevel.Specification, assert.False},
{"/packages/0/tools/0/systems/0/host", "arm-linux-gnueabihf", compliancelevel.Strict, assert.False},
Expand Down
3 changes: 3 additions & 0 deletions internal/rule/schema/schemadata/bindata.go
Original file line number Diff line number Diff line change
Expand Up @@ -3904,6 +3904,9 @@ var _arduinoPackageIndexDefinitionsSchemaJson = []byte(`{
"validHost": {
"$comment": "https://github.com/arduino/arduino-cli/blob/cdbebe98f895c18146ea2607cfb706d002b01191/arduino/cores/tools.go#L144-L155",
"anyOf": [
{
"pattern": "^all$"
},
{
"pattern": "^arm.*-linux-gnueabihf$"
},
Expand Down

0 comments on commit 8ec1138

Please sign in to comment.