Skip to content

Commit 92a44b2

Browse files
stuggiopenshift-merge-bot[bot]
authored andcommitted
crd-schema-check: allow new CRDs
If the 'git show BASE_REF' fails assume it is a net new CRD and should be fine. Signed-off-by: Martin Schuppert <[email protected]>
1 parent 5d9278f commit 92a44b2

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

hack/crd-schema-checker.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ trap cleanup EXIT
1414

1515
for crd in config/crd/bases/*.yaml; do
1616
mkdir -p "$(dirname "$TMP_DIR/$crd")"
17-
git show "$BASE_REF:$crd" > "$TMP_DIR/$crd"
18-
$CHECKER check-manifests \
19-
--existing-crd-filename="$TMP_DIR/$crd" \
20-
--new-crd-filename="$crd"
17+
if git show "$BASE_REF:$crd" > "$TMP_DIR/$crd"; then
18+
$CHECKER check-manifests \
19+
--existing-crd-filename="$TMP_DIR/$crd" \
20+
--new-crd-filename="$crd"
21+
fi
2122
done

0 commit comments

Comments
 (0)