Skip to content

Commit

Permalink
Test prereqs, fix requireds
Browse files Browse the repository at this point in the history
  • Loading branch information
theory committed Jul 2, 2024
1 parent af9ecfc commit ec543f1
Show file tree
Hide file tree
Showing 7 changed files with 369 additions and 24 deletions.
6 changes: 1 addition & 5 deletions schema/v1/bugtracker.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
"description": "An email address to which bug reports can be sent"
}
},
"anyOf": [
{ "required": ["web"] },
{ "required": ["mailto"] },
{ "required": ["web", "mailto"] }
],
"anyOf": [{ "required": ["web"] }, { "required": ["mailto"] }],
"patternProperties": {
"^[xX]_.": {
"description": "Custom key"
Expand Down
6 changes: 1 addition & 5 deletions schema/v1/no_index.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
}
}
},
"anyOf": [
{ "required": ["file"] },
{ "required": ["directory"] },
{ "required": ["file", "directory"] }
],
"anyOf": [{ "required": ["file"] }, { "required": ["directory"] }],
"patternProperties": {
"^[xX]_.": {
"description": "Custom key"
Expand Down
8 changes: 6 additions & 2 deletions schema/v1/prereq_phase.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@
}
},
"additionalProperties": false,
"minProperties": 1,
"$comment": "Really should require at least one of the named properties; this allows for a single _x property. Good enough for now.",
"anyOf": [
{ "required": ["requires"] },
{ "required": ["recommends"] },
{ "required": ["suggests"] },
{ "required": ["conflicts"] }
],
"examples": [
{
"requires": {
Expand Down
9 changes: 7 additions & 2 deletions schema/v1/prereqs.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@
"description": "The develop phase’s prereqs are extensions needed to work on the distribution’s source code as its maintainer does. These tools might be needed to build a release tarball, to run maintainer-only tests, or to perform other tasks related to developing new versions of the distribution."
}
},
"minProperties": 1,
"$comment": "Really should require at least one of the named properties; this allows for a single _x property. Good enough for now.",
"anyOf": [
{ "required": ["configure"] },
{ "required": ["build"] },
{ "required": ["test"] },
{ "required": ["runtime"] },
{ "required": ["develop"] }
],
"patternProperties": {
"^[xX]_.": {
"description": "Custom key"
Expand Down
6 changes: 1 addition & 5 deletions schema/v1/repository.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
"description": "a lowercase string indicating the VCS used."
}
},
"anyOf": [
{ "required": ["url", "type"] },
{ "required": ["web"] },
{ "required": ["web", "url", "type"] }
],
"anyOf": [{ "required": ["url", "type"] }, { "required": ["web"] }],
"patternProperties": {
"^[xX]_.": {
"description": "Custom key"
Expand Down
7 changes: 5 additions & 2 deletions schema/v1/resources.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
}
},
"additionalProperties": false,
"minProperties": 1,
"$comment": "Really should require at least one of the named properties; this allows for a single _x property. Good enough for now.",
"anyOf": [
{ "required": ["homepage"] },
{ "required": ["bugtracker"] },
{ "required": ["repository"] }
],
"examples": [
{
"homepage": "https://pgxn.org/",
Expand Down
Loading

0 comments on commit ec543f1

Please sign in to comment.