mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-02 14:55:25 +03:00
feat: verify dream-lock.json against jsonschema
This commit is contained in:
parent
b1e15df1a1
commit
56fae02e3a
@ -97,8 +97,8 @@
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"rootName": { "type": "string" },
|
||||
"rootVersion": { "type": "string" },
|
||||
"rootName": { "type": ["string", "null"] },
|
||||
"rootVersion": { "type": ["string", "null"] },
|
||||
"path": { "type": "string" },
|
||||
"type": { "type": "string" },
|
||||
"dir": { "type": "string" }
|
||||
|
@ -232,6 +232,12 @@ in
|
||||
| python3 ${../apps/cli/format-dream-lock.py} \
|
||||
| sponge $dreamLockPath
|
||||
|
||||
# validate dream-lock.json against jsonschema
|
||||
${python3.pkgs.jsonschema}/bin/jsonschema \
|
||||
--instance $dreamLockPath \
|
||||
--output pretty \
|
||||
${../specifications/dream-lock-schema.json}
|
||||
|
||||
# add dream-lock.json to git
|
||||
if git rev-parse --show-toplevel &>/dev/null; then
|
||||
echo "adding file to git: $dreamLockPath"
|
||||
|
Loading…
Reference in New Issue
Block a user