ci(schema): support jq 1.8 policy evaluation

This commit is contained in:
shangguanxuan.sgx committed 2026-07-15 18:55:19 +08:00
1 parent b876b9b4ae
commit adc87a92e4
1 file changed
+4 -4
+4 -4
View File
@@ -196,6 +196,10 @@ fi
binding_count="$(jq '[.bindings[] | length] | add' internal/cli/schema_parameter_bindings.json)"
if ! jq -e --slurpfile bindings internal/cli/schema_parameter_bindings.json '
. as $catalog |
([$bindings[0].bindings | to_entries[] |
.key as $tool | .value | to_entries[] |
{tool: $tool, flag: .key, property: .value}
]) as $expected |
$bindings[0].version == 3 and
$bindings[0].baseline.manifest == "schema-parameter-bindings-v3" and
($bindings[0].baseline.sha256 | test("^sha256:[0-9a-f]{64}$")) and
@@ -218,10 +222,6 @@ if ! jq -e --slurpfile bindings internal/cli/schema_parameter_bindings.json '
all(($bindings[0].mapping_exclusions // {} | to_entries)[];
(.key | length) > 0 and (.value | length) > 0
) and
([$bindings[0].bindings | to_entries[] |
.key as $tool | .value | to_entries[] |
{tool: $tool, flag: .key, property: .value}
]) as $expected |
all($expected[];
. as $binding |
$catalog.tools[$binding.tool].parameters[$binding.flag].property == $binding.property