Skip to content

Commit

Permalink
builds(schema): Set manifest schema to be stricter (#5093)
Browse files Browse the repository at this point in the history
  • Loading branch information
chawyehsu authored Aug 21, 2022
1 parent 08ecdd1 commit dea9ebb
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 50 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.log
.DS_Store
._.DS_Store
scoop.sublime-workspace
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

- **config:** Change config option to snake_case in file and SCREAMING_CASE in code ([#5116](https://github.com/ScoopInstaller/Scoop/issues/5116))

### Builds

- **schema**: Set manifest schema to be stricter ([#5093](https://github.com/ScoopInstaller/Scoop/issues/5093))

## [v0.2.4](https://github.com/ScoopInstaller/Scoop/compare/v0.2.3...v0.2.4) - 2022-08-08

### Features
Expand Down
126 changes: 76 additions & 50 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,91 +179,94 @@
"type": "array"
},
"autoupdateArch": {
"type": "object",
"additionalProperties": false,
"properties": {
"url": {
"$ref": "#/definitions/autoupdateUriOrArrayOfAutoupdateUris"
},
"hash": {
"$ref": "#/definitions/hashExtractionOrArrayOfHashExtractions"
},
"extract_dir": {
"$ref": "#/definitions/stringOrArrayOfStrings"
},
"extract_to": {
"$ref": "#/definitions/stringOrArrayOfStrings"
"bin": {
"$ref": "#/definitions/stringOrArrayOfStringsOrAnArrayOfArrayOfStrings"
},
"env_add_path": {
"$ref": "#/definitions/stringOrArrayOfStrings"
},
"env_set": {
"type": "object"
},
"bin": {
"$ref": "#/definitions/stringOrArrayOfStringsOrAnArrayOfArrayOfStrings"
"extract_dir": {
"$ref": "#/definitions/stringOrArrayOfStrings"
},
"shortcuts": {
"$ref": "#/definitions/shortcutsArray"
"hash": {
"$ref": "#/definitions/hashExtractionOrArrayOfHashExtractions"
},
"installer": {
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"type": "string"
}
},
"type": "object"
}
},
"post_install": {
"$ref": "#/definitions/stringOrArrayOfStrings"
"shortcuts": {
"$ref": "#/definitions/shortcutsArray"
},
"psmodule": {
"url": {
"$ref": "#/definitions/autoupdateUriOrArrayOfAutoupdateUris"
}
}
},
"autoupdate": {
"type": "object",
"additionalProperties": false,
"properties": {
"architecture": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
"32bit": {
"$ref": "#/definitions/autoupdateArch"
},
"64bit": {
"$ref": "#/definitions/autoupdateArch"
}
},
"type": "object"
}
},
"persist": {
"bin": {
"$ref": "#/definitions/stringOrArrayOfStringsOrAnArrayOfArrayOfStrings"
},
"env_add_path": {
"$ref": "#/definitions/stringOrArrayOfStrings"
},
"env_set": {
"type": "object"
},
"extract_dir": {
"$ref": "#/definitions/stringOrArrayOfStrings"
},
"hash": {
"$ref": "#/definitions/hashExtractionOrArrayOfHashExtractions"
},
"license": {
"$ref": "#/definitions/license"
},
"notes": {
"$ref": "#/definitions/stringOrArrayOfStrings"
}
},
"type": "object"
},
"autoupdate": {
"anyOf": [
{
"$ref": "#/definitions/autoupdateArch"
},
{
"persist": {
"$ref": "#/definitions/stringOrArrayOfStringsOrAnArrayOfArrayOfStrings"
},
"psmodule": {
"type": "object",
"additionalProperties": false,
"properties": {
"notes": {
"$ref": "#/definitions/stringOrArrayOfStrings"
},
"architecture": {
"type": "object",
"additionalProperties": false,
"properties": {
"32bit": {
"$ref": "#/definitions/autoupdateArch"
},
"64bit": {
"$ref": "#/definitions/autoupdateArch"
}
}
"name": {
"type": "string"
}
}
},
"url": {
"$ref": "#/definitions/autoupdateUriOrArrayOfAutoupdateUris"
}
],
"type": "object"
}
},
"checkver": {
"anyOf": [
Expand Down Expand Up @@ -614,6 +617,29 @@
"type": "string"
}
},
"if": {
"properties": {
"architecture": {
"properties": {
"64bit": {
"properties": {
"url": false
}
},
"32bit": {
"properties": {
"url": false
}
}
}
}
}
},
"then": {
"required": [
"url"
]
},
"required": [
"version",
"homepage",
Expand Down

0 comments on commit dea9ebb

Please sign in to comment.