Skip to content

Commit b03e3c4

Browse files
committed
add jq filter
Signed-off-by: Stefan Seide <[email protected]>
1 parent 680f4bd commit b03e3c4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docker/replace-var-filter.jq

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def check_value:
2+
.|with_entries(.value = if (.value|type) == "array" then .=(.value|map(.|check_value))
3+
elif (.value|type) == "object" then .=(.value|check_value)
4+
elif .value == $var_name then .=$new_value
5+
else .=.value end);
6+
7+
.|check_value

0 commit comments

Comments
 (0)