You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
301 B
13 lines
301 B
#!/bin/bash
|
|
|
|
DIR="crdschemas"
|
|
|
|
# Go to git repository root
|
|
cd ./$(git rev-parse --show-cdup)
|
|
|
|
rm -rf "$DIR"
|
|
mkdir "$DIR"
|
|
|
|
for crd in vendor/prometheus-operator/*-crd.libsonnet; do
|
|
jq '.spec.versions[0].schema.openAPIV3Schema' < "$crd" > "$DIR/$(basename "$crd" | sed 's/-crd.libsonnet/.json/')"
|
|
done
|
|
|