-
Notifications
You must be signed in to change notification settings - Fork 193
/
Copy pathverify-generated-crd.sh
executable file
·47 lines (41 loc) · 1.47 KB
/
verify-generated-crd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
set -euo pipefail
function verify_crd {
local SRC="$1"
local DST="$2"
if [[ -e "$SRC" ]]
then
if [[ -e "$DST" ]]
then
if ! diff -Naup "$SRC" "$DST"; then
echo "inconsistent CRD: $SRC => $DST"
exit 1
fi
else
echo "missing CRD: $SRC => $DST"
exit 1
fi
else
if [[ -e "$DST" ]]
then
echo "extra CRD: $DST"
exit 1
fi
fi
}
shopt -s extglob
verify_crd \
vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers?(-Default).crd.yaml \
"manifests/00-custom-resource-definition.yaml"
verify_crd \
"vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-CustomNoUpgrade.crd.yaml" \
"manifests/00-custom-resource-definition-CustomNoUpgrade.yaml"
verify_crd \
"vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-DevPreviewNoUpgrade.crd.yaml" \
"manifests/00-custom-resource-definition-DevPreviewNoUpgrade.yaml"
verify_crd \
"vendor/github.com/openshift/api/operator/v1/zz_generated.crd-manifests/0000_50_ingress_00_ingresscontrollers-TechPreviewNoUpgrade.crd.yaml" \
"manifests/00-custom-resource-definition-TechPreviewNoUpgrade.yaml"
verify_crd \
"vendor/github.com/openshift/api/operatoringress/v1/zz_generated.crd-manifests/0000_50_dns_01_dnsrecords.crd.yaml" \
"manifests/00-custom-resource-definition-internal.yaml"